java.sql.SQLException: Can't call commit when autocommit=true
当我在数据库更新,插入,删除等方法中使用了commit(),rollback()等方法时,往往会报出如下的异常: java.sql.SQLException: Can't call commit when autocommit=true解析:commit()的作用: 使自从上一次提交/回滚以来进行的所有更改成为持久更改,并释放此Connection对象当前保存的所有数据库锁定。此...
原创
2011-01-28 16:47:14 ·
347 阅读 ·
0 评论