ma ouml

ma ouml

  • NA
  • 436
  • 84.5k

SQL insert query does not execute

Mar 14 2017 3:13 PM
ERROR : La sous-requête a retourné plusieurs valeurs. Cela n'est pas autorisé quand la sous-requête suit =, !=, <, <= , >, >= ou quand elle est utilisée en tant qu'expression.
L'instruction a été arrêtée.
 
 voici la requete 
Program.cmd.CommandText = "insert into bon_reception_marche (Id_marche,Designation_bon_reception,Num_bon_reception,Date_reception,Unite,Qte,Prix_unitaire,Montant,TVA,MO,OT,User_create,Date_create)values((select distinct Id_marche from marche where Libelle_marche = '" + comboBox3.Text + "'),'" + textBox2.Text + "','" + textBox1.Text + "','" + dateTimePicker1.Value.Date + "','" + textBox3.Text + "', " + Convert.ToDouble(textBox4.Text) + "," + Convert.ToDouble(textBox5.Text) + "," + Convert.ToDouble(textBox6.Text) + "," + Convert.ToDouble(comboBox1.Text) + ",'" + textBox8.Text + "','" + textBox9.Text + "','" + values.username + "','" + DateTime.Now.Date + "')";
thanks for adavance 
 

Answers (4)