Hi ,

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", "COMPLETED");

result.updateString("FILENAME", fileName);

result.updateRow();

}

Rgds

Sajeev

[1385 byte] By [sajeev_varghesea] at [2007-11-26 19:40:07]
# 1
This might be helpful to you: http://forum.java.sun.com/thread.jspa?threadID=227177&messageID=804525Also, does it work if you update just one column?
zadoka at 2007-7-9 22:19:48 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 2
.
sajeev_varghesea at 2007-7-9 22:19:48 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 3
Its happening when i update only a column also
sajeev_varghesea at 2007-7-9 22:19:49 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 4
the data you try to insert violate a constraint defined in the database (unique valu for a column, for instance)).... I think it's a business exception that is not well handled(more than a technical problem)
alban.maillerea at 2007-7-9 22:19:49 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 5
No constraint is defined in DB for that table...
sajeev_varghesea at 2007-7-9 22:19:49 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 6
no primary key either?
alban.maillerea at 2007-7-9 22:19:49 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 7
yes there is primary key constraint but the respective coloumn which undergoes updation is not under this constraint!
sajeev_varghesea at 2007-7-9 22:19:49 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...