title: How to insert 1 or 0 in Sql Server for bit type field if checkbox is checked?
body: <p>I am trying to insert 1 or 0 in my SQL Server Database, and my data type is "bit".
  I have tried doing this but it says incorrect syntax near where-</p>
  
  <pre><code>dt=g1.ExecDB( insert into tbl ("check1,check2,check3") values('"
              + Convert.ToByte(check1.Checked) + "','"
              + Convert.ToByte(check2.Checked) + "','"
              + Convert.ToByte(check3.Checked) + "' ) )
                where loginname = '"+Session["log"].ToString() + "'"
              ) ;
  </code></pre>
  
  <p>Please Guide me where I am doing wrong?</p>