Hi All,
I am trying to bind a column in my database to a checkbox on my form. The column is of datatype bit and contains either a 0 or 1 value.
I am currently using this:
VB Code:
cbxNoT.DataBindings.Add("CheckState", dtCD, "NoT")
I get the error message: Unable to bind Boolean to windows.forms.checkbox. I changed "CheckState" to "Checked" and it worked for those records marked with the value 1 but returned the error: cannot cast from type DBNull to type boolean for those records marked with a 0.
Any help appreciated.


Reply With Quote