错误示意:

C#|Insert Into 语句的语法错误

一开始程序是:

C#|Insert Into 语句的语法错误

改正:

一条很简单的插入语句竟然会报错,然而直接在数据库的查询中执行中却没有问题,这个问题困扰了不少时间。

数据库使用的是ACCESS,INSERT INTO语句为insert into userInfo(user, pwd) values('test','test')

一般可能列名发生关键字冲突,于是给user, pwd加了[],即insert into userInfo([user], [pwd]) values('test','test'),就正常了。

 

相关文章:

  • 2021-09-13
  • 2022-12-23
  • 2021-06-16
  • 2022-12-23
  • 2022-12-23
  • 2021-09-02
  • 2021-12-04
猜你喜欢
  • 2022-03-05
  • 2021-12-21
  • 2021-07-05
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案