ahussain
09-07-2007, 10:35 PM
Hi,
Can any one tell me that how can I insert/update check box into access yes/no field. I tried to update in this way....
//Gettin' value in o or 1
byte result = convert.ToByte(chk1.checked)
com = new OleDbCommand(String.Format(@"Update Table SET
firstname= '{0}',
LastName ='{1}',
status = {2}
Where ID = {3}",
txtName.Text,txtLast.Text,result,ID),con)
Does any one where exactly the problem is . the compiler says
cant index or zero based argument.....
Single word will be appreciated.
Can any one tell me that how can I insert/update check box into access yes/no field. I tried to update in this way....
//Gettin' value in o or 1
byte result = convert.ToByte(chk1.checked)
com = new OleDbCommand(String.Format(@"Update Table SET
firstname= '{0}',
LastName ='{1}',
status = {2}
Where ID = {3}",
txtName.Text,txtLast.Text,result,ID),con)
Does any one where exactly the problem is . the compiler says
cant index or zero based argument.....
Single word will be appreciated.