Hi,
I'm having " 'System.DBNull' type object not assigned to 'System.Byte[]' type " exception on reading picture data from database into picture object. When there is a picture no problem I get it, but I cannot handle the null case. I tried many alternatives but no result. Here is the code
string sSqlCommand="select pic from per015_ssk where sicil_no='" + dfSicilNo.Text + " ' ";
OleDbCommand cmd = new OleDbCommand(sSqlCommand,conn);
ImageByte = (byte[]) cmd.ExecuteScalar() ; // here I get the exception. I tried to use ?? but couldn't succeed
thanks in advance,
snky