Syntax Error on INSERT into User Table in MS Access 2003

倖福魔咒の 提交于 2019-11-28 14:34:23

User and Password are reserved keywords. Change the names, or use square brackets around the names in the query:

    Dim cmd As OleDbCommand = New OleDbCommand("INSERT INTO [USER] (Name, Surname, Username, Country, TelNo, [Password], Address) VALUES (?, ?, ?, ?, ?, ?, ?)", conn)

Then, for then next error that you will encounter: As the parameters are not named in the query, the parameter objects in the Parameters collection has to be added in the same order as they are used in the query.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!