如何修改包含外键的表

如何修改包含外键的表

本文介绍了如何修改包含外键的表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi friends,
I have a table named "bon récéption " and which contains a foreign key Id_marche and in the interface of "bon récéption " I filled the combobox of the "libélllé marche"short market the problem is in button modify when I want to modify gives me this error
I will extract here my code and the error
thank you in advance





我尝试过:





What I have tried:

Program.cmd.CommandText = "update bon_reception_marche set Id_marche = (select distinct Id_marche from marche where Libelle_marche = '" + comboBox3.Text + "') ,Designation_bon_reception ='" + textBox2.Text + "',Num_bon_reception='" + textBox1.Text + "',Date_reception ='" + dateTimePicker1.Value.Date + "',Unite ='" + textBox3.Text + "',Qte= " + Convert.ToDouble(textBox4.Text) + ",Prix_unitaire=" + Convert.ToDouble(textBox5.Text) + ",Montant =" + Convert.ToDouble(textBox6.Text) + ",TVA =" + Convert.ToDouble(comboBox1.Text) + ",MO ='" + textBox8.Text + "',OT ='" + textBox9.Text + "' where Id_bon_reception_marche ="+textBox7.Text;







erreur




erreur

Le format de la chaîne d'entrée est incorrect.

推荐答案


这篇关于如何修改包含外键的表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-05 20:54