Re: OCI Error Handling (trapping UPDATE errors)

From: Sergey Sikorskiy <sergey_sikorsky_at_worldnet.att.net>
Date: Fri, 16 Nov 2001 01:56:07 GMT
Message-ID: <Xm_I7.113766$WW.6931276_at_bgtnsc05-news.ops.worldnet.att.net>


"Ron Reidy" <rereidy_at_indra.com> wrote in message news:3BDDF407.EBC63DB0_at_indra.com...
> Massis Isagholian wrote:
> >
> > I have an OCI application that's trying to update a non-existent row.
The
> > problem is that the OCIStmtExecute() function does not return an error
when
> > this happens. I'm using "if (OCIStmtExecute(...))" for error detection.
Is
> > this not the right way to detect this type of errors?
> >
> > Thanks
> > Massis
> From the docs...
>

......

> /* register the callback for each bind handle */
> OCIBindDynamic (bindp2[0],errhp,row_off,my_callback,0,0);
> OCIBindDynamic (bindp2[1],errhp,row_off,my_callback,0,0);
> /* execute the UPDATE statement */
> OCIStmtExecute (svchp,stmtp2,errhp,2,0,0,0,OCI_BATCH_ERRORS);
> ...
>
>
> In this example, OCIBindDynamic() is used with a callback because the
> user does not know at compile time what rows will return with errors.
> With a callback, you can simply pass the erroneous row numbers, stored
> in row_off, through the callback context and send only those rows that
> need to be updated or corrected. The same bind buffers can be shared
> between the INSERT and the UPDATE executes.
>
> </long winded explanation>
> --
> Ron Reidy
> Oracle DBA
> Reidy Consulting, L.L.C.

 Wrong signature. All this stuff is going from ORACLE, not from you. And it explains absolutely nothing ...

Did you really use array DML interface in your life?

--
Sergey Sikorsky
Informax, Inc.
Received on Fri Nov 16 2001 - 02:56:07 CET

Original text of this message