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
4 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Bryian TanPosted Mar 14, 2017, 3:50 PM
ma oumlPosted Mar 14, 2017, 3:56 PM
ma oumlPosted Mar 14, 2017, 3:42 PM
Bryian TanPosted Mar 14, 2017, 3:32 PM