DBNull Value type casting
Hi
Can anyone help me in finiding the solution for the DBHull value type casting.
Infact I am storing values into the database and retrieving them into the datagrid. when there is null value in the database it gives me an error " System.InvalidCastException: Object cannot be cast from DBNull to other types.
at System.DBNull.System.IConvertible.ToDateTime(IFormatProvider provider) at
System.Convert.ToDateTime(Object value)".
Any idea how to manage it while I would like to mention that while adding the parameters into the database I am using ("Parameter", DBNull.Value).
Many Thanks.