11-04-23, 01:13 AM
Dim savInto As New OleDb.OleDbCommand
Dim CnStr As String = "provider = Microsoft.ACE.OLEDB.12.0;" &
"data Source= " & Application.StartupPath & "\Database3.accdb"
Dim Conn As New OleDbConnection(CnStr)
savInto.Connection = Conn
savInto.CommandType = CommandType.Text
savInto.CommandText = "Insert into Proced1(Number,Name,Program,PD,Goal,Effect,Class,Sharing,Date)" &
"Values(" & TextBox1.Text & ",'" & TextBox2.Text & "','" & TextBox3.Text & "', '" & TextBox4.Text & "' , &
'" & TextBox5.Text & "', '" & TextBox6.Text & "', '" & TextBox7.Text & "','" & TextBox8.Text & "','" & TextBox9.Text & "')"
Conn.Open()
savInto.ExecuteNonQuery()
Conn.Close()
MsgBox(" تم الحفظ بنجاج")
يظهر لي حطأ في تكوين الجملة
ممكن احد يعرف وين المشكلة
خطأ * تصحيح
Dim CnStr As String = "provider = Microsoft.ACE.OLEDB.12.0;" &
"data Source= " & Application.StartupPath & "\Database3.accdb"
Dim Conn As New OleDbConnection(CnStr)
savInto.Connection = Conn
savInto.CommandType = CommandType.Text
savInto.CommandText = "Insert into Proced1(Number,Name,Program,PD,Goal,Effect,Class,Sharing,Date)" &
"Values(" & TextBox1.Text & ",'" & TextBox2.Text & "','" & TextBox3.Text & "', '" & TextBox4.Text & "' , &
'" & TextBox5.Text & "', '" & TextBox6.Text & "', '" & TextBox7.Text & "','" & TextBox8.Text & "','" & TextBox9.Text & "')"
Conn.Open()
savInto.ExecuteNonQuery()
Conn.Close()
MsgBox(" تم الحفظ بنجاج")
يظهر لي حطأ في تكوين الجملة
ممكن احد يعرف وين المشكلة
خطأ * تصحيح