1 Attachment(s)
Constraint Error on Form Load
I have a winforms program and when I publish the program and load this one form I get a constraint error. I do not get the error when I run the program while debugging. In the Immediate window I will see - A first chance exception of type 'System.Data.ConstraintException' occurred in System.Data.dll error but the form loads just fine. The error seems to be pointing to my Items table which is my child table.
I have checked the table and I can't find any records that are missing a parent record.
I have made sure the fill orders are correct on form_load.
I have checked all my datacolumns in my dataset to make sure they are the right DataType and MaxLength. Thinking maybe I had changed a field type in the database and not changed it in my dataset. But nothing. Everything is correct.
Has anyone ever seen this? Is there another way to debug this and get more or better information?
Thanks,
Stacy
VS2010 - SQL 2008 R2 RTM
P.S. I have also checked that fields that are not allowed to be left Null aren't in fact Null. I found none.
My Dataset isn't the problem is it? I have two parents linked to child tables but not linked to each other - like this...
Attachment 105509
This form used to work though, that's what has me stumped. Very frustrating.