
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所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)