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 Scrollable Result Sets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Scrollable Result Sets" Watch "Scrollable Result Sets" New topic

Scrollable Result Sets

ashish sharma

Joined: Sep 27, 2001
Posts: 3
I am trying to use scrolleble result set.But at the rs.moveToInsertRow();//
i m getting sqlexception:
The exception is :
Balance is 1000 Account is1
Balance is 1000 Account is2
Balance is 1000 Account is3
Balance is 1000 Account is4
Balance is 1000 Account is5
java.sql.SQLException: Invalid operation for read only resultset: moveToInsertRo
at oracle.jdbc.dbaccess.DBError.throwSqlException(
at oracle.jdbc.dbaccess.DBError.throwSqlException(
at oracle.jdbc.driver.BaseResultSet.moveToInsertRow(
at InsertRow.main(

can u explain the reason.
I m using the latest thn driver bundled with oracle.
[ Editted by Dave to format code ]
[This message has been edited by David O'Meara (edited November 02, 2001).]
Chantal Ackermann
Ranch Hand

Joined: Sep 28, 2000
Posts: 508
The Exception tells that your ResultSet is readonly. Check the API if you have instantiated the resultset the right way for it to have write access. check as well if the driver and oracle support this feature.
Praveen Balaji
Ranch Hand

Joined: Jun 17, 2001
Posts: 60
i faced this problem with jdk1.3 which is suposed to support JDBC 2. Looks like there is some problem out there. I took the classes from JBuilder 5.0 's jre. These classes work. I am not sure if JDBC2 has been shippe with all the jdk1.3, or if it has been included only later. In the later case, you might not be using JDBC 2
if you dont manage to get the right driver classes, contact me at
I agree. Here's the link:
subject: Scrollable Result Sets
It's not a secret anymore!