在做SSH项目时,更新数据库操作报错,后台打印为

Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 解决方法

 

 实现类里的更新代码

Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 解决方法

 

 可以看出更新是根据id来操作实现的,刚开始JSP页面忘了传id值,更正后的页面

Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 解决方法

 

 加上后,提交action到后台时,将id也传过去,就不会报错,可以实现更新功能了。

相关文章:

  • 2022-12-23
  • 2022-02-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-29
猜你喜欢
  • 2022-02-13
  • 2021-11-01
  • 2022-12-23
  • 2021-10-05
相关资源
相似解决方案