File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC 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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Scrollable Result Sets" Watch "Scrollable Result Sets" New topic
Author

Scrollable Result Sets

ashish sharma
Greenhorn

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
w
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:156)
at oracle.jdbc.driver.BaseResultSet.moveToInsertRow(BaseResultSet.java:4
46)
at InsertRow.main(InsertRow.java:34)

can u explain the reason.
I m using the latest thn driver bundled with oracle.
Thanks.
[ 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.
chantal
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 praveen.balaji@iflexsolutions.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Scrollable Result Sets
 
Similar Threads
About Connection.close()
Passing Parameters
Problems in Closing PreparedStatements using WS AS 3.5 Connection Pooling using Oracl
datasource lookup
Help required.