在ResultSet updateRow之后重置光标位置 [英] Reset cursor position after ResultSet updateRow
问题描述
由于某种原因,调用updateRow
时,Oracle JDBC驱动程序可能会将ResultSet
游标移动到其他位置(而不是同一行,而不是下一行)(我也在插入和删除行).我该如何避免这个问题?
For some reason, the Oracle JDBC driver may move the ResultSet
cursor somewhere else (not to the same row, and not to the next row) when updateRow
is called (I am also inserting and deleting rows). How can I avoid this problem?
注意:结果是按表的主键排序的(我已经在SQL中指定了此顺序).但是我越来越怀疑"order by"子句不能正常工作.
Note: The results are ordered by the primary key of the table (I've specified this in the SQL). But I'm increasingly suspecting that the "order by" clause is not working properly.
推荐答案
此问题是由于用户错误引起的.我有另一个在另一台机器上运行的应用程序的副本,我已经忘记了它,并且同时更改了数据库.
This problem was due to user error. I had another copy of the application running on a different machine, which I had forgotten about, and that was changing the database at the same time.
这篇关于在ResultSet updateRow之后重置光标位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!