V
Vanja Andreev
have soure something like this
private SqlInt32 _Licni_ID = SqlInt32.Null;
pomosna = new DataSet();
....
_MaticenLekar=Convert.ToInt32(pomosna.Tables[0].Rows[0]["MaticenLekar"]);
The application works OK except when "MaticenLekar" returns null when
i get error "Object cannot be cast from DBNull to other types."
i tryed all types of convert and non of them worked
So my question is how to convert System.DBNull.Value to
System.Data.SqlTypes.SqlInt32.Null?
private SqlInt32 _Licni_ID = SqlInt32.Null;
pomosna = new DataSet();
....
_MaticenLekar=Convert.ToInt32(pomosna.Tables[0].Rows[0]["MaticenLekar"]);
The application works OK except when "MaticenLekar" returns null when
i get error "Object cannot be cast from DBNull to other types."
i tryed all types of convert and non of them worked
So my question is how to convert System.DBNull.Value to
System.Data.SqlTypes.SqlInt32.Null?