aspose file tools
The moose likes JDBC and the fly likes Multiple updateXXX calls in sequence for multiple rows. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Multiple updateXXX calls in sequence for multiple rows." Watch "Multiple updateXXX calls in sequence for multiple rows." New topic
Author

Multiple updateXXX calls in sequence for multiple rows.

sajeev varghese
Greenhorn

Joined: Jan 27, 2006
Posts: 14
Hi ,

When i try to retrieve & update rows obtain through Updateble Result Date.I am getting the following Exception.

java.sql.SQLException: Value conflicts occurs
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:211)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:274)
at oracle.jdbc.driver.UpdatableResultSet.execute_updateRow(UpdatableResultSet.java:2136)
at oracle.jdbc.driver.UpdatableResultSet.updateRow(UpdatableResultSet.java:1322)
at weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_UpdatableResultSet.updateRow(Unknown Source)
at de.cc_gmbh.ps.common.AutoPDFDownloadListener.run(AutoPDFDownloadListener.java:237)
at java.lang.Thread.run(Thread.java:536)

Code:
PreparedStatement preStmt = null;
ResultSet result = null;
preStmt = dbCon.prepareStatement(query,ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_UPDATABLE);
preStmt.setString(1, "QUEUE");
result = preStmt.executeQuery();
while (result.next())
{
//retrieve data //destination = result.getString(1);
//Processing those

result.updateString("STATUS", BTConstants.STATUS_COMPLETE);
result.updateString("FILENAME", fileName);
result.updateRow();
}

Rgds
Sajeev
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Multiple updateXXX calls in sequence for multiple rows.
 
Similar Threads
How to get the number of rows in a ResultSet
JDBCExceptionReport and Hibernate
java.sql.SQLException: ORA-01733: virtual column not allowed here
Oracle 9i :trouble using setnull(...) in a PreparedStatement
String to CLOB conversion