title: How to add record in table in windows form application
body: <p>i am working on some data entry program in windows form, i write the following code on button click event to add records in table but records doesn't add it gives me an error of execute non query </p>
  
  <pre><code>private void button2_Click(object sender, EventArgs e)        
  {             
      SqlConnection con = new SqlConnection("Data Source=JASMEETSINGH-PC;Initial Catalog=Desnet;Integrated Security=True"); 
      con.Open();   
      SqlCommand cmd = new SqlCommand("Insert into BillEntry values('" + textBox1.Text + "', '" + textBox2.Text + "', '" + textBox3.Text + "', '" + dateTimePicker1.DataBindings + "', '" + textBox4.Text + "', '" + dateTimePicker2.DataBindings + "', '" + radioButton1.DataBindings + "', '" + radioButton2.DataBindings                 + "', '" + textBox5.Text + "','" + textBox6.Text + "','" + textBox7.Text + "','" + textBox8.Text + "','" + textBox9.Text + "','" + textBox10.Text + "')", con);     
      int i = cmd.ExecuteNonQuery();  
      if (i &gt; 0)           
      {                 
          label15.Text = "Record Added Successfully";            
      } 
  }
  </code></pre>
  
  <p>data type used:-
  varchar(10)
  varchar(100)
  varchar(20)
  date
  varchar(25)
  date
  char(3)
  float
  float
  float
  varchar(20)
  varchar(50)
  float</p>