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
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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: error code when executing BatchUpdate