Invalid Cast from System.DBNull
Posted on 2003-11-15
Hi Thanks for clicking,
Get this error "Invalid cast from System.DBNull to System.Windows.Form.CheckState"
This happens in the VB6_AddADODataBinding() routine
at the function ADOBind_Adodc14.Add(ClientChange, "CheckState", "ClientChange", StdCheckBoxFmt, "ClientChange")
where ClientChange is a simple checkbox
Using ADO (and not ADO.net) because converted over from Access 2000 to VB6 and then to vb.net.
Problem seems to be that the Table that ADO is binding to is deleted (hence DBNull), and is only filled by running a Query later in the code.
Anybody any ideas how to get round this?? Your thoughts would be very very welcome because I've been struggling with this for some time.