I am trying to store an image in my SQL Server database, what datatype should I use?In the below \[code\]code aspx.cs\[/code\], I am trying to read all the bytes from the request inputstream and store it in the database, but the \[code\]byte[]\[/code\] array is not updated properly in table. Am I missing something?\[code\]protected void Page_Load(object sender, EventArgs e){ Request.InputStream.Position = 0; byte[] Contents = new byte[Request.InputStream.Length]; Request.InputStream.Read(Contents, 0, (int)Request.InputStream.Length); con.Open(); try { string query = "update tblImageUpload set " + IMAGE_ID + " = @imageBytes where Image_ID='" + CID + "'"; int i = 0; using (cmd = new SqlCommand(query, con)) { cmd.Parameters.Add("@imageBytes", SqlDbType.VarBinary, Contents.Length).Value = http://stackoverflow.com/questions/15645812/Contents; i = cmd.ExecuteNonQuery(); } Response.Write("Upload Query = " + query); Response.Write("Upload Code = " + i); } catch (Exception ex) { Response.Write("Upload Code=" + ex); }\[/code\]