Syntax error in INSERT INTO statement in asp.net

前端 未结 2 1254
南旧
南旧 2021-01-26 09:37

I am using ASP.NET with MS.Access In databse.. there is table called login with three fields i.e. id, username, password. following is the code which i am trying to run.

2条回答
  •  太阳男子
    2021-01-26 10:29

    try like this

    String q = "insert into login (username, [password]) values (@u, @p)"; 
    

    cause: password is reserved word

    Source

提交回复
热议问题