Syntax error when executing INSERT INTO statement

前端 未结 4 1269
灰色年华
灰色年华 2021-01-23 08:52

I input the Right dataSource but it didnt i cant fixed the problem cmd.ExecuteNonQuery() saying:

Syntax error in INSERT INTO

4条回答
  •  心在旅途
    2021-01-23 08:59

    You are missing single quotes around your first value. Try

    " VALUES('" & Me.text1.Text & "','" & Me.text2.Text & "','" & _
        Me.text3.Text & "','" & Me.text4.Text & "','" & Me.text5.Text & "','" & _
        Me.text6.Text & "','" & Me.text7.Text & "','" & Me.text8.Text & "','" & _
        Me.text9.Text & "','" & Me.text10.Text & "','" & Me.text11.Text & "','" & _
        Me.text12.Text & "')"
    

提交回复
热议问题