ORA-01002: 读取违反顺序 怎样解决?

qzg168 2002-04-24 11:39:28
执行下列语句时出现:ORA-01002: 读取违反顺序错误:
String cmd = "SELECT CONTENT FROM BLOBTEST WHERE filename='row3' FOR UPDATE";
ResultSet rest = st.executeQuery(cmd);
...全文
1921 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
lhsoft 2002-05-27
  • 打赏
  • 举报
回复
谢谢你的答案,mycode。
flowerofwind 2002-04-24
  • 打赏
  • 举报
回复
意思是说可能你提交了后然后又进行了fetch炒作,或者数据集已经取完了,oracle报告了"found no data"后,你又一次fetch,所以发生了这个错误
flowerofwind 2002-04-24
  • 打赏
  • 举报
回复
01002, 00000, "fetch out of sequence"
// *Cause: This error means that a fetch has been attempted from a cursor
// which is no longer valid. Note that a PL/SQL cursor loop
// implicitly does fetches, and thus may also cause this error.
// There are a number of possible causes for this error, including:
// 1) Fetching from a cursor after the last row has been retrieved
// and the ORA-1403 error returned.
// 2) If the cursor has been opened with the FOR UPDATE clause,
// fetching after a COMMIT has been issued will return the error.
// 3) Rebinding any placeholders in the SQL statement, then issuing
// a fetch before reexecuting the statement.
// *Action: 1) Do not issue a fetch statement after the last row has been
// retrieved - there are no more rows to fetch.
// 2) Do not issue a COMMIT inside a fetch loop for a cursor
// that has been opened FOR UPDATE.
// 3) Reexecute the statement after rebinding, then attempt to
// fetch again.
qzg168 2002-04-24
  • 打赏
  • 举报
回复
JBuilder6
thingsfly 2002-04-24
  • 打赏
  • 举报
回复
你这是用的什么开发工具??
thingsfly 2002-04-24
  • 打赏
  • 举报
回复
你这是用的什么开发工具??
mycode 2002-04-24
  • 打赏
  • 举报
回复 1
也许访问数据库的模式是隐式提交的方式,即每一个SQL语句执行时,就自动的Commit,这样就发生这样的错误.改一下就可以了.
iliepeng 2021-07-30
  • 举报
回复
@mycode 给这个错误折腾一整天了,谢谢

2,596

社区成员

发帖
与我相关
我的任务
社区描述
Sybase相关技术讨论区
社区管理员
  • Sybase社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧