Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> OCIErrorGet after OCITransCommit
Hi
I'm doing an update of a row in a table wich results in a constraint integrity violation.
If I do it like this:
OCIStmtExecute(svchp, stmthp, errhp, (ub4) 1, (ub4) 0,
(CONST OCISnapshot *) NULL, (OCISnapshot *) NULL,
OCI_COMMIT_ON_SUCCESS)
And then get the error message with OCIErrorGet then the error message
sais that
there is a constraint integrity violation.
If I do it like this:
OCIStmtExecute(svchp, stmthp, errhp, (ub4) 1, (ub4) 0,
(CONST OCISnapshot *) NULL, (OCISnapshot *) NULL, OCI_DEFAULT)
OCITransCommit(svchp, errhp,OCI_DEFAULT);
Then OCIErrorGet only tells me: 'transaction rolled back'.
Since I do a lot of updates and/or inserts before committing the transaction I have to use the second way but then Oracle won't tell me which update/insert caused the error.
Is there an other way how to find out which constraint was violated?
Please help!
Laci
Received on Wed Dec 05 2001 - 06:43:37 CST