473,396 Members | 1,743 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Binding Radiobutton Problem

Hi,

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

this.radioButton1.DataBindings.Add(new
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
0 1333

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: William Gill | last post by:
I am placing radiobuttons in a 4 X 4 matrix (using loops) and keep references to them in a 2 dimensional list ( rBtns ). It works fine, and I can even make it so only one button per column can be...
5
by: William Ryan | last post by:
In a nutshell, I need to get the name of the object that was just pressed (in this case, the object will be a radioButton). I want to write one handler for all four radio buttons and branch off...
1
by: Frank Yamrick | last post by:
I am trying to program an application that requires a large number of screnes that are very similar in the respect that all the bottons and labels interact with each other with the same...
11
by: Rourke Eleven | last post by:
I have looked and searched. What good is the databind property on Radiobuttons? How does one go about actually using it? What is a good resource on this? I understand that I can easily get/set...
4
by: sck10 | last post by:
Hello, I am trying to use a radiobutton inside of a FormView for editing data. My question is how do you bind the radio buttons to the data field? Thanks, sck10 <td style="width:30%;...
2
by: Eric | last post by:
Simple problem - binding Visible property of label to Checked property of radiobutton on the same form. How do I do that in VS2005?? Visible="<%# radiob.Checked %>" - DOESN'T WORK It was so...
4
by: Igor | last post by:
RadioButton have property Checked (true or false). If I make RadioButtons with code, without drawing by mouse than I have problems. I write like this: Dim rb(0 To 2) As RadioButton Dim n As...
5
by: Matt B | last post by:
I know this is a bit of nonstandard behavior, but I would like the Enter key to move focus through a group of radiobuttons without selecting them. The user would then have to use Space or actually...
15
by: tshad | last post by:
I have the following in my VS 2008 code: parameters(0).Value = Session("User").CompanyID I assume this means that since there is no "User" at this point I can't do this. But it will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.