Member Avatar

I have a standard Windows Forms Application project with an SQL database connected to it.
It got some textboxes and stuff.

But the tricky part for me is the checkboxes (bit values). It says (as far as I can see) in the properties that their checkstate should be Unchecked.

And so they are when i start debugging and run the program - until I add new (don't remember the name for it - its the PLUS button in my program). When i do that - they are checked. This will not work for my program.

I am new to C# - so be gentle =)

Thats unusual, as to be checked it means it has a value other than 0, and by default the answer is 0 or false.

When you hit the plus button are you creating a class or just inserting a db record? Does it have any specical code?

Are the check boxes linked to the db directly?

Member Avatar

It seems that the checkboxes are linked - as they have a db icon next to it (In the properties window).

The plus button is inserting a new record into the DB, yes.

Then those values would normally default to false, eg unchecked if there was nothing else going on..

Member Avatar

I would think so too - but they just don't.

Trace it all from the time you click the add, and watch the variables and components.. it will be there somewhere