In my asp.net+vb+acces databasew eb i have a gridview in which there is a field which is a checkbox field and the field in access database is Yes/No (Baloon).
the code used to insert was working fine before i changed the remark field from text to baloon. now it is not working. error as
Data type mismatch in criteria expression.
the code i used is as under
Dim sql_ins As String
sql_ins = "insert into tasks (Appt,Task,Actionby,Complete,Remark) values (@a,@b,@c,@d,@e)"
Dim oledbcom As New OleDbCommand(sql_ins, con)
oledbcom.Parameters.Add(New OleDbParameter("@a", OleDbType.VarChar, 8)).Value = DropDownList1.Text
oledbcom.Parameters.Add(New OleDbParameter("@b", OleDbType.VarChar, 50)).Value = tasktxt.Text
oledbcom.Parameters.Add(New OleDbParameter("@c", OleDbType.VarChar, 50)).Value = DropDownList2.Text
oledbcom.Parameters.Add(New OleDbParameter("@d", OleDbType.Date)).Value = comptxt.Text
oledbcom.Parameters.Add(New OleDbParameter("@e", OleDbType.VarChar, 50)).Value = CheckBox1.Text
oledbcom.ExecuteNonQuery()