我正在使用Visual Studio 2010和MS Access 2007
我无法解决错误
调试时,“Insert Into”中出现“语法错误”但是sql语法是正确的 我是vb.net的新手,如果有人能给我一个解决方案,我将不胜感激。
Try
Dim query As String = "INSERT INTO User([ID],[StudName],Address])VALUES('002','haerth','col')"
Dim comLib As New OleDbCommand
With comLib
.CommandText = query
.Connection = conLib
.ExecuteNonQuery()
End With
MessageBox.Show("Added Successfully")
Catch ex As OleDbException
MessageBox.Show(ex.ToString)
End Try
`
答案 0 :(得分:2)
您的括号不匹配:地址]