W
Woody Splawn
I have a winform with a checkbox on it. The editor is named CBXE30.
I have it bound to a bit field in SQL Server 2000. In design mode, in the
databindings section of the control I have the Checked property set to
DsMain1 - Contracts.E30.
The binding appears to be working correctly because if I bring a certain
record to the WinForm where I know that the E30 Column in the Database is
equal to 1, the CBXE30 checkbox on the form appears checked. If I bring it
to the screen and I know ahead of time that the E30 column in the db equals
0, the CBXE30 checkbox appears unchecked.
The problem comes when I make a change to the CheckBox. If I check or
uncheck it and try to post the record to the database I get an error message
of "Error converting the VarChar value T to a column of data type bit".
What's going on here? Do I need to write some code in one or more of the
events associated with the checkbox. If so, what event and what code should
I write. I would like this to be a 3 state checkbox.
I have it bound to a bit field in SQL Server 2000. In design mode, in the
databindings section of the control I have the Checked property set to
DsMain1 - Contracts.E30.
The binding appears to be working correctly because if I bring a certain
record to the WinForm where I know that the E30 Column in the Database is
equal to 1, the CBXE30 checkbox on the form appears checked. If I bring it
to the screen and I know ahead of time that the E30 column in the db equals
0, the CBXE30 checkbox appears unchecked.
The problem comes when I make a change to the CheckBox. If I check or
uncheck it and try to post the record to the database I get an error message
of "Error converting the VarChar value T to a column of data type bit".
What's going on here? Do I need to write some code in one or more of the
events associated with the checkbox. If so, what event and what code should
I write. I would like this to be a 3 state checkbox.