Hello to all

am new programmer facing a problem in saving three checkboxs into database

for example
a
b
c

all of the has a value in the database

any one can heple from scratch

I'll be greatfull

regards,

Such a broad question makes it very difficult to give a good answer.

When you are wanting to store the check boxes, are you checking for yes/no values or something like options a new vehicle?

If you are storing yes/no then it is as simple as storning them in bit/tinyint/boolean fields.

An example for SQL Server (using bit and the OleDB library) would be:

Dim iBitVal As Integer = IIf(CheckBox1.Checked,1,0)
Dim cmdUpdate As New OleDBCommand("UPDATE myTable Set bitColumn1=" & iBitVal & " WHERE UniqueField=MyUniqueValue",MyOleDBConnection)
cmd.Update()

If you are storing something such as options on a new vehicle, you will to design your table accordingly. You can store them all in one field using a max length column or you could create a field for each option (only if constant - Very sloppy but some times manditory)

I hope this helps.

Please provide more infromation for a better answer. :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.