Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Multiple updateXXX calls in sequence for multiple rows.

 
sajeev varghese
Greenhorn
Posts: 14
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic