An explicit value for the identity column in table 'users' can only be specified when a column list

An explicit value for the identity column in table 'users' can only be specified when a column list,第1张

概述eclipse中tomcat console提示如下: An explicit value for the identity column in table 'users' can only be specified when a column list is used and IDENTITY_INSERT is ON.  users中的字段有:userid,username,passwd,gr

eclipse中tomcat console提示如下:

An explicit value for the IDentity column in table 'users' can only be specifIEd when a column List is used and IDENTITY_INSERT is ON. 


users中的字段有:userID,username,passwd,grade

原始:

String sqlUpdate="insert into users values (null,?,?)";

数据库为sqlserver2008R2

由于users中的userID设置为自动增长,所以不需要在插入时设置该值,修改为:

String sqlUpdate="insert into users values (?,?)";

总结

以上是内存溢出为你收集整理的An explicit value for the identity column in table 'users' can only be specified when a column list全部内容,希望文章能够帮你解决An explicit value for the identity column in table 'users' can only be specified when a column list所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/sjk/1171492.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-06-02
下一篇2022-06-02

发表评论

登录后才能评论

评论列表(0条)

    保存