File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes ORA-01002:fetch out of sequence Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "ORA-01002:fetch out of sequence " Watch "ORA-01002:fetch out of sequence " New topic

ORA-01002:fetch out of sequence

raju parepally parepally

Joined: Mar 01, 2006
Posts: 14
Dear colleages,
i am getting this exception randomly when i am calling procedure from jsp page java.sql.SQLException RA-01002:fetch out of sequence this error is coming randomly when this error has occured i am not getting data from database i am willing to know the problem is it from jsp or database procedure

Thanx in advance
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1082

Do not post same question again.

following is the description of ORA-01002 error

In a host language program, a FETCH call was issued out of sequence. A successful parse-and-execute call must be issued before a fetch. This can occur if an attempt was made to FETCH from an active set after all records have been fetched. This may be caused by fetching from a SELECT FOR UPDATE cursor after a commit. A PL/SQL cursor loop implicitly does fetches and may also cause this error.

[ May 11, 2006: Message edited by: Shailesh Chandra ]

Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
raju parepally parepally

Joined: Mar 01, 2006
Posts: 14
Thank you for your reply

I agree. Here's the link:
subject: ORA-01002:fetch out of sequence
It's not a secret anymore!