CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
不看会后悔的Windows XP之经验谈 简单快捷DIY实用家庭影院
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  Oracle >  开发

ORA-01002: 读取违反顺序,是什么错误,应该怎样解决!

楼主reeb2000(james)2003-12-02 14:43:38 在 Oracle / 开发 提问

多谢各位! 问题点数:0、回复次数:2Top

1 楼ruyuezhang(ruyue)回复于 2003-12-02 15:27:16 得分 0

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.  
  Top

2 楼xinpingf(白开心)回复于 2003-12-04 10:52:04 得分 0

CURSOR到了最后,仍要尝试fetch记录  
  或者cursor压根没有数据Top

相关问题

  • 读取违反顺序在线等
  • ORA-01002: 读取违反顺序 怎样解决?
  • java中不支持这样的oracle语句么:"select * from table_name for update"?,我在sqlplus中可以执行的,但在java中就报错::“ORA-01002: 读取违反顺序”。
  • 关于读取顺序文件
  • 读取ResultSet中列的值时读取顺序问题
  • 关于数据库中的数据读取顺序问题
  • 如何顺序读取一段字符串
  • 怎样顺序读取文本文件中的内容?
  • 顺序文件读取的问题?(把顺序文件内容写到ACCESS数据库中)
  • 请各位高手给我一个顺序读取文本文件的例了!!!

关键词

  • fetch
  • cursor
  • issue
  • causes
  • statement
  • rows
  • error

得分解答快速导航

  • 帖主:reeb2000

相关链接

  • Oracle类图书

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
世纪乐知(北京)网络技术有限公司 版权所有, 京 ICP 证 020026 号
北京创新乐知广告有限公司 提供技术支持
Copyright © 2000-2007, CSDN.NET, All Rights Reserved
GongshangLogo