Re: Struggling with OCI :-<

From: Scott Urman <surman_at_oracle.com>
Date: 1996/01/17
Message-ID: <4djntt$nmv_at_inet-nntp-gw-1.us.oracle.com>#1/1


In article <30FC7001.15EF_at_bearriver.com>, Allan Hoeltje <ahoeltje_at_bearriver.com> writes:
|> 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.

Sounds like you are using an old version of OCI. The version shipped with Oracle7 provides header files for the CDA and LDA structures, which define the return code field with name rc. It's the 12th byte into the structure, and goes for 2 bytes. This is all documented in the version 7 OCI manual, by the way.

|>
|> 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