(13-10-20, 12:16 AM)سعود كتب : وعليكم السلام ورحمة الله وبركاته
مارايك اخي الكريم ان ترفع المثال لمعرفة الحل بشكل سريع.
اخي هذا الكود لم يقبله
Dim sqcomand As New OleDbCommand
sqcomand.Connection = conn
sqcomand.CommandType = CommandType.Text
sqcomand.CommandText = "INSERT INTO tb_ana (id_malade,nom,prenom,age,datee,pr1,pr2,pr3,pr4,pr5,pr6,pr7,pr8,pr9,pr10,pr11,pr12,pr13,pr14,pr15,pr16,pr17,pr18,pr19,pr20) VALUES ('" & Label5.Text & "','" & TextBox1.Text & "','" & TextBox2.Text & "','" & TextBox3.Text & "','" & Date.Today & "','" & ListBox1.Items.Item(0) & "','" & ListBox1.Items.Item(1) & "','" & ListBox1.Items.Item(2) & "','" & ListBox1.Items.Item(3) & "','" & ListBox1.Items.Item(4) & "','" & ListBox1.Items.Item(5) & "','" & ListBox1.Items.Item(6) & "','" & ListBox1.Items.Item(7) & "','" & ListBox1.Items.Item(8) & "','" & ListBox1.Items.Item(9) & "','" & ListBox1.Items.Item(10) & "','" & ListBox1.Items.Item(11) & "','" & ListBox1.Items.Item(12) & "','" & ListBox1.Items.Item(13) & "','" & ListBox1.Items.Item(14) & "','" & ListBox1.Items.Item(15) & "','" & ListBox1.Items.Item(16) & "','" & ListBox1.Items.Item(17) & "','" & ListBox1.Items.Item(18) & "','" & ListBox1.Items.Item(19) & "')"
conn.Open()
sqcomand.ExecuteNonQuery()
conn.Close()
MsgBox("تم حفظ البيانات بنجاح", MsgBoxStyle.Information + MsgBoxStyle.MsgBoxRight, "تم الحفظ")