Hi,
I'm getting error - Object cannot be cast from DBNull to other types at the following line of code
cbCan.Checked = (Convert.ToBoolean(dt.Rows[0]["cb1"]) ? true : false);
In the database, cb1 is a bit column with a value of null.
How do I fix this error?
Thanks
Joe Green
Go to the complete details ...