how to bind a checkbox to a SQL bit field or what data type to use for gender of a person in an SQL

  • Thread starter Thread starter Neo
  • Start date Start date
N

Neo

I have a field named "Male" & this is of SQL BIT data type (SQL Server).
How can i bind this field to a check box?

I noticed that this field can be NULL, 0 or 1.
But i'm having trouble binding this field to my check box.

i get an error when i try the following,

'oDataTable is the Data Table with the relevant record & having the field
"Male"
CheckBox1.DataBindings.Add("Checked", oDataTable, "Male")

Else, whats the best way to store the gender of a person - what should the
data type of the field be?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top