asp.net - How do I insert values into BIT datatype? -
we have checkbox on 1 of our forms.
if user checks box , clicks save button, have value of 1 or true inserted table.
if however, box not checked, rather inserting null, insert 0 or false.
any idea how solve this?
thanks alot in advance
how checking non null input:
insert mytable (mybitfield) values (case when @mycheckboxparameter null 0 else 1)
Comments
Post a Comment