I want to insert a checkbox value into a SQL Server database but it does not work. May I know how to insert that value into a SQL Server database?
This is my code:
Dim serUpdate As string
Try sConn.Open
If checkbox.Checked = True Then
serUpdate = "INSERT INTO xxxx(checkbox) VALUES ('Y')"
End If
sCmd.CommandText = serUpdate
sCmd.ExecuteNonQuery()
Catch ex As Exception
Response.write(ex)
Finally
sConn.Close()
End Try
bitin SQL Server for a boolean, @G3nt_M3caj .int.