By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,783 Members | 1,347 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,783 IT Pros & Developers. It's quick & easy.

Binding Radiobutton Problem

P: n/a

I have a problem with binding. I want to bind a field in my database to
a radiobutton. I achieve this with this code

System.Windows.Forms.Binding("Checked", this.dsServis, "tableName"))
My problem is: when radiobuutton's checked changed binding sets the
field in dataset's table with booelan value "true" or "false". the
field's type is bit in my database(SQL Server) and boolean in dataset's
schema. When i'm trying to update dataset, it gives an errror:

System.Data.SqlClient.SqlException: Syntax error converting the varchar
value 'T' to a column of data type bit.
T is the first character of TRUE. It tryes to update that field with a
string. How can i change the field's type with "SqlDbType.Bit" or use
"0" and "1" instead of "TRUE" and "FALSE".

Thanks for answers.

May 18 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.