Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: OCI 8 fetching question
Hi Dave,
I think you can't know how many rows will ultimately be fetched, unless you
explicitly count them.
Anyway, you do no need to know how many rows will be fetched to issue your
query. The first call to OCIStmtExecute will get from the server as many
rows as specified, then you can get next ones using OCIStmtFetch call like
hereafter:
OCIStmtFetch (..., ... , ... , OCI_FETCH_NEXT, OCI_DEFAULT);
Hope this helps.
davew9_at_my-deja.com wrote:
> I am using the OCI 8 library and have a question about fetching data. I
> am fetching data from a database using a sql statement similar to
> "select fooint, foodbl from foo". I don't know how many rows will be
> fetched prior to fetching them, and ultimately need to know how many
> rows are successfully fetched (or can be successfully fetched) at
> runtime. Is there a way to determine this information (such as using
> OCIAttrGet)?
>
> Thanks in advance,
>
> Dave W.
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Thu Jul 06 2000 - 00:00:00 CDT