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

Home -> Community -> Usenet -> c.d.o.misc -> Oracle Array Update and sqlerrd[2] in PROC/C++ HELP!!!!!!!!!!!

Oracle Array Update and sqlerrd[2] in PROC/C++ HELP!!!!!!!!!!!

From: Edward A Thompson <ed4becky_2000_at_yahoo.com>
Date: 16 Apr 2002 11:54:40 -0700
Message-ID: <d913df37.0204161054.b28a780@posting.google.com>


Coding an array update in Pro C/C++ in an Oracle 8.0.5 environment (don't ask...). Having trouble when errors occur in one of the updates...

If I have an array of 5 updates, (EXEC SQL FOR 5...), with the first update on a non-existant row, I expect Oracle to stop processing on the first element of the array, and return sqlerrd[2] = 1. What I get is sqlerrd[2] = 4 (IE, it processed successfully array elements 2-5)

If the 3rd element of the array is bad, sqlerrd[2] = 3, which is what I would expect (3 rows processed, stopped processing after 3rd (bad) element.

It seems that Oracle stops if an error occurs in the middle of the array, but not for the first element?

If the 5th element bombs, sqlerrd2] = 4, telling me 4 rows were processed. How do I know if its stopped on the 4th becuase 4 was bad, vsprocessed 4 good and one bad?

I am lost....

I had assumed 2 things:

1 Oracle stops processing and array when an error occurs 2 sqlerrd[2] tells me how many rows it processed not including(?) the one in error.

The observed behavior seems inconsistant.... Received on Tue Apr 16 2002 - 13:54:40 CDT

Original text of this message

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