می خوام عکسی رو که از sql server جستجو کردم تو یه picture box نشون بدم. برای اینکار
کد زیر رو می نویسم
buffer1 = (byte[])(objdataset.Tables["tbl_caramuz"].Rows[objcm.Position]["pic"]);
MemoryStream objstream = new MemoryStream(buffer1);
PictureBox objbox =PictureBox1;
objbox.Image = Image.FromStream(objstream);
objbox = null;
objstream.Close();
اما error زیر رو میده

Unable to cast object of type ‘system.DBNull’ to type ‘system.Byte[]’