Bound Checkbox and SQL datatypes

I have a Windows form that was created by dropping a data source. One field was set to create a checkbox control. The SQL field is SmallInt with 0's and 1's. If I run the form and click on the checkbox the program hangs.
I can stop the program from the IDE.
1) This appears to be a bug
2) Is it possible to bind a checkbox to an SQL smallint? If not how does one use the checkbox with SQL table data?
[418 byte] By [BobHeitzman] at [2008-2-22]
# 1
Hi Bob,

This is indeed a bug. It should be possible to bind a checkbox to a SQL smallint. I will work with our dev team to see about getting this fixed.

In the mean time, you can work around this by dragging a CheckBox from the Toolbox window onto your form and then setting its (DataBindings)->Checked property in the Properties window to your SmallInt column on the BindingSource generated by the Data Sources Window.

I hope this helps.

Jay Hickerson
Visual Basic Team

JayHickerson at 2007-9-8 > top of Msdn Tech,Windows Forms,Windows Forms Data Controls and Databinding...
# 2
I got this to work by setting the CheckState to None (it was bound the the field I wanted to use) and setting the Checked property to the correct field.

That is I swaped the DataBinding values of CheckState and Checked on the CheckBox that was created by dragging a DataSource Tables(Details) on to a form.

Seems to work OK with 1, 0, and Null.

Thanks!

BobHeitzman at 2007-9-8 > top of Msdn Tech,Windows Forms,Windows Forms Data Controls and Databinding...