jQuery in Action, 2nd edition*
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 Murach's Java Servlets and JSP this week in the Servlets 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
PreparedStatement
Unique Key Constraint Violated
Problems with sentence "SELECT MAX(KEY_NAME_TABLE) FROM NAME_TABLE" in MDB (WAS)
Entity beans validation, how to know what constraint is being violated?
Why would a thread fail?