As we know in numerous of the documentations it is mentioned that the 3rd element of the Host array SQLCA.SQLERRD
i.e. sqlca.sqlerrd[2]
contains the cumulative number of rows processed by the SQL statement so far (in terms of Pro*C).
Does someone know of the significance of the other elements i.e. [0]
,[1]
and what they signify?
According to the error handling documentation, they don't do anything; they're reserved for future use, though it's starting to look unlikely they'll actually ever be utilised. sqlerrd
is declared as long[6]
, but only [2]
and [4]
appear to be used, with the latter the offset into the SQL statement for a parse error.
It's interesting that they don't use [0], [1] or [3] though; wonder if they were used for something else in an earlier version. This old informix link has a similar structure with similar meanings for [2]
and [4]
, so might give a hint at what they expected to use the others for; but may be a meaningless coincidence...
PostgreSQL seems to have the same structure, as does DB2, and SQL Server has something that looks related. It's starting to look suspiciously like a standard... albeit one that Oracle only partially adheres to.