16-02-15, 06:30 PM
(16-02-15, 05:26 PM)سعود كتب : استخدم الجملة الكاملة للاضافة والتي تحتوي اسماء الاعمدة وبعدها القيم
كود :
cmdInsH.CommandText = "INSERT INTO shbka2 VALUES(" + TextBox1.Text + "','" + ComboBox2.Text + "','" + txtNam.Text + "','" + txtPon.Text + "','" + txtnak.Text + "','" + txtAddr.Text + "','" + txtq.Text + "','" + txtprice.Text + "','" + txtTotal.Text + "','" + TextBox2.Text + ",'" + DateTimePicker1.Text + "')"
غير هذه الى
كود :
cmdInsH.CommandText = "INSERT INTO shbka2 VALUES('" + TextBox1.Text + "','" + ComboBox2.Text + "','" + txtNam.Text + "','" + txtPon.Text + "','" + txtnak.Text + "','" + txtAddr.Text + "','" + txtq.Text + "','" + txtprice.Text + "','" + txtTotal.Text + "','" + TextBox2.Text + ",'" + DateTimePicker1.Text + "')"
تقصد مثل هده
PHP كود :
cmd.CommandText = "Insert Into shbka2([id],[date],[empID],[empName],[empPhone],[nakname],[empAddress],[shbka],[all],[baky],[date]) values ('" & TextBox1.Text & "','" & ComboBox2.Text & "','" & txtNam.Text & "','" & txtPon.Text & "','" & txtnak.Text & "','" & txtAddr.Text & "','" & txtq.Text & "','" & txtprice.Text & "','" & txtTotal.Text & "','" & TextBox2.Text & ",'" + DateTimePicker1.Text + "')"

