【发布时间】:2016-04-28 11:46:05
【问题描述】:
我想使用 JDBC RowSet 更新数据库中的记录。我首先获取所需的记录,然后使用 updateRow() 进行更新。但它不会反映在数据库上。没有报告错误。
rowSet.setCommand("SELECT * FROM Employee WHERE uid="+e.getUid());
rowSet.execute();
rowSet.updateString("name", e.getName());
// More update operations
rowSet.updateRow();
【问题讨论】:
-
你有
autoCommit()==true/你有没有明确地打电话给rowSet.commit()? -
我相信 autoCommit = true 因为没有 rowSet.commit() 插入和删除工作正常