title: Conversion failed when converting the varchar value to data type int in SQL Server query Windows Forms
body: <p>I would like to add a record in my database.</p>
  
  <p>There is my code below :</p>
  
  <pre><code>private void buttonAdd_Click(object sender, EventArgs e)
  {
      con.Open();
  
      SqlDataAdapter sda = new SqlDataAdapter("Insert into RDV (idUser,idClient,objet,objectif,DateRdv,commentaire)values('"+comboBox1.Text+"','"+comboBox2.Text+ "','" + textBox1.Text + "','" + textBox2.Text + "','" + dateTimePicker1.Text.ToString() + "','" + textBox4.Text + "')", con);
  
      sda.SelectCommand.ExecuteNonQuery();
      con.Close();
  
      MessageBox.Show("Le RDV a été ajouté avec succés !");
  }
  </code></pre>
  
  <p>but an error happens:</p>
  
  <blockquote>
    <p>Conversion failed when converting the varchar value 'John' to data type int.</p>
  </blockquote>
  
  <p>How should I convert it? Please help me.</p>
  
  <p>Thanks in advance. </p>