aspose file tools*
The moose likes JDBC and the fly likes error code when executing BatchUpdate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "error code when executing BatchUpdate" Watch "error code when executing BatchUpdate" New topic
Author

error code when executing BatchUpdate

jeff zhang
Greenhorn

Joined: Sep 25, 2000
Posts: 9
Hi,
When I tried to run a BatchUpdate command(executeBatch())
and got the following error info if the unique constraint
was violated.
getErrorCode() = 17081
getMessage() = error occurred during batching: ORA-00001: unique constraint (AWS.USERS_LOGIN_PK) violated
The SQLException was caught and the getErrorCode() returned 17081,
but not 1. Why?
Any help?
Thanks
Jeff
Jim Baiter
Ranch Hand

Joined: Jan 05, 2001
Posts: 532
Did you disable the auto-commit? If not, do
connection.setAutoCommit(false);
jeff zhang
Greenhorn

Joined: Sep 25, 2000
Posts: 9
Jim,
I did, but no help.
Thanks,
Jeff
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: error code when executing BatchUpdate
 
Similar Threads
Unique Key Constraint Violated
Why would a thread fail?
Problems with sentence "SELECT MAX(KEY_NAME_TABLE) FROM NAME_TABLE" in MDB (WAS)
PreparedStatement
Entity beans validation, how to know what constraint is being violated?