title: How to insert checked checkboxes values in access database?
body: <pre><code>OleDbConnection con = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\jay.desai\Documents\Visual Studio 2008\Projects\Test\Test\Test.mdb");
  
  con.Open();   
  OleDbCommand cmd = new OleDbCommand("insert into EmpTest values(@Emp_No,@Gender,@Language)", con);
  
              cmd.Parameters.AddWithValue("@Emp_No", textBox1.Text);
              if (radioButton1.Checked)
              {
                  cmd.Parameters.AddWithValue("@Gender", radioButton1.Text);
              }
              else
              {
                  cmd.Parameters.AddWithValue("@Gender", radioButton2.Text);
              }
              if (checkBox1.Checked)
              {
                  cmd.Parameters.AddWithValue("@Language", checkBox1.Text);
              }
              if (checkBox2.Checked)
              {
                  cmd.Parameters.AddWithValue("@Language", checkBox2.Text);
              }
              if (checkBox3.Checked)
              {
                  cmd.Parameters.AddWithValue("@Language", checkBox3.Text);
              }
              if (checkBox4.Checked)
              {
                  cmd.Parameters.AddWithValue("@Language", checkBox4.Text);
              }
              cmd.ExecuteNonQuery();
              con.Close();
  </code></pre>
  
  <p>when i click on submit button only the first checked checkbox value inserted in database??</p>