日期:2014-05-18  浏览次数:20937 次

这句SQL语句哪错了?
C# code
Insert into [User] (User,Pass,Jifen,Zhuangtai,QQ,Email,Q,A,Dengji,ZhuceIP,DengluIP,Denglushijian,Zhuceshijian) values('xiaoc','zxczxc','0','0','123','zhuxiaocan461@vip.qq.com','111','222','0','1','1','1','1')


System.Data.OleDb.OleDbException: INSERT INTO 语句的语法错误。

------解决方案--------------------
Insert into [User] ([User],Pass,Jifen,Zhuangtai,QQ,Email,Q,A,Dengji,ZhuceIP,DengluIP,Denglushijian,Zhuceshijian) values('xiaoc','zxczxc','0','0','123','zhuxiaocan461@vip.qq.com','111','222','0','1','1','1','1')
?



------解决方案--------------------
User是数据库保留的名称,就像C#代码里不能用if做变量名,非得用的话要加上@一样