Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to change forward only Resultset type.

843854Nov 19 2003 — edited Nov 19 2003
Hi,

In my code I have a Statement Object. I have executed a query which returns a resultset.
In my code i need to iterate through the resultset twice. First iteration goes through alright but when I try to execute the code

rs.beforeFirst();

I get following exception.
java.sql.SQLException: Invalid operation for forward only resultset : beforeFirst

I want to know the method of changing forward only property of ResultSet or is there any other way of tackling the problem if I don't want to execute the query twice.

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 17 2003
Added on Nov 19 2003
4 comments
1,273 views