Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Scrollable Result Sets

 
ashish sharma
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 508
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic