Re: Struggling with OCI :-<

From: Allan Hoeltje <ahoeltje_at_bearriver.com>
Date: 1996/01/17
Message-ID: <30FC7001.15EF_at_bearriver.com>#1/1


Keith Majkut wrote:
>
> The first parameter to OERMSG should be csr->rc, meaning the return
> code, not a variable named crs_rc....

Hum, the cursor data area does not contain an identifier named "rc". Am I making my point about the Oracle documentation or what?

There are at least three "return codes" that I have found in the documentation: 1) the value returned by the OCI "o" routines; 2) csrdef.csrrc; and 3) csrdef.csrarc.

Sometimes rc #1 is just a negative copy of rc #3. Sometimes rc #1 is identical to rc #2. In any case _none_ of these return codes appear to make the oermsg() routine happy. Now, maybe the actual text for the error messages is a separate Oracle product? ;-)

> The only way to tell the exact number of rows is to fetch them. You
> could execute a 2nd query and do a SELECT count(*) but that isn't
> guaranteed to work since rows could be inserted/deleted in between
> the time you did the first select count(*) and the real select.
>

Thanks for this info, as dissapointing as it is. If my memory is not slipping I believe the Sybase equivalent to Oracle's OCI does make this number available before actually doing a fetch. I just assumed similar functionality existed in Oracle.

-Allan Received on Wed Jan 17 1996 - 00:00:00 CET

Original text of this message