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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Oracle 8i OCI (newbie) Q: no. rows returned in a SELECT?

Re: Oracle 8i OCI (newbie) Q: no. rows returned in a SELECT?

From: Markus Schumann <go4shoe_at_hotmail.com>
Date: Mon, 06 Aug 2001 13:03:55 GMT
Message-ID: <%Awb7.222125$mG4.101635867@news1.mntp1.il.home.com>

John,

have a look at http://codeguru.earthweb.com/mfc_database/Osql10.shtml

It is a nice C++ wrapper for a some of the OCI stuff. You might like it since you are good C++ programmer.

Markus.

"John Garner" <jgarner_at_commercenti.com> wrote in message news:3B6E8502.8D1FCED_at_commercenti.com...
> Hi,
>
> I'm a good C++ programmer, but new to Oracle and for the life of me
> cannot find out how many rows a select query has returned via the OCI
> and any of the attributes. Not without fetching all the rows first
> anyway, which I don't want to have to cache in memory as there may be a
> lot of them.
>
> I've tried OCIAttrGet() on the statement handle once it's
> OCIStmtExec()'d with both OCI_ATTR_ROW_COUNT and OCI_ATTR_PARAM_COUNT,
> but both of them appear to set it to 0(zero) - possibly the number of
> rows fetched so far (done straight after the query).
>
> I can fetch the number of columns fine using OCIAttrGet and
> OCI_ATTR_PARAM_COUNT, my OCI call for number of rows looks the same
> apart from the different attribute I want.
>
> Help! Can you find out how many rows a query returns without getting
> them all????
>
> John G.
Received on Mon Aug 06 2001 - 08:03:55 CDT

Original text of this message

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