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 Updating a ResultSet object.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Updating a ResultSet object.." Watch "Updating a ResultSet object.." New topic

Updating a ResultSet object..

rajesh madhira

Joined: Apr 09, 2007
Posts: 3
The following piece of code prints out a "YES" on the console but when i try to update the ResultSet object rs, i get an Exception saying

YES"java.sql.SQLException: Invalid operation for read only resultset : updateBoolean at oracle.jdbc.dbaccess.DBError.throwSqlException(
at oracle.jdbc.dbaccess.DBError.throwSqlException(
at oracle.jdbc.driver.BaseResultSet.updateBoolean(
at org.apache.commons.dbcp.DelegatingResultSet.updateBoolean("

The code follows:

conn = querySession.getConnection();
DatabaseMetaData dmd = conn.getMetaData();
ResultSet rs = preparedStatement.executeQuery(query);

can somebody help me out....??

Rajesh Madhira
I agree. Here's the link:
subject: Updating a ResultSet object..
It's not a secret anymore!