Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> OCIErrorGet after OCITransCommit

OCIErrorGet after OCITransCommit

From: Laci <laci_at_gmx.ch>
Date: 5 Dec 2001 04:43:37 -0800
Message-ID: <41aadac6.0112050443.1d77a940@posting.google.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US