OCIErrorGet after OCITransCommit 
Author Message
 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



Sun, 23 May 2004 20:43:37 GMT
 
 [ 1 post ] 

 Relevant Pages 

1. OCI8 questions about OCIErrorGet()


 
Powered by phpBB® Forum Software