请帮助我确定我的代码出了什么问题,查询似乎很好,我尝试在phpmyadmin上执行它。

  Dim cmdString As OdbcCommand
        cmdString = New OdbcCommand("INSERT INTO info_student (`idno`, `Last Name`, `First Name`, `Year and Section`, `Birthday`, `Address`) VALUES('" & (TextBox6.Text) & "','" & (TextBox1.Text) & "','" & (TextBox2.Text) & "','" & (TextBox3.Text) & "','" & (TextBox8.Text) & "','" & (TextBox10.Text) & "','" & (TextBox4.Text) & "'", con)
        cmdString.ExecuteNonQuery()

我得到这个错误:
ERROR [42000] [MySQL][ODBC 5.1 Driver][mysqld-5.1.36-community-log]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

最佳答案

insert语句末尾缺少结束括号。

                                                    V
...& (TextBox10.Text) & "','" & (TextBox4.Text) & "')", con)...
                                                    ^

10-07 19:39