Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: OCI cursor
Arie Tuchfeld <arie_at_hyperbanner.net> wrote:
> I'd like to iterate through a query result using OCI interface.
> i.e. fetching each row at a time until the last result's row.
> How can it be done ?
> Currently, I use OCIDefineByPos() function to place the result into an
> array, but this way I need to know the number of rows in advance.
Not sure whether I get it right. You have an out Cursor variable,
that is bound using OCIBind(!) before OCIStmtExecute.
Then after execution you do your OCIDefines on the cursor according
to column structure of resultset.
Finally you may fetch your results by OCIFetch. Each time there
is another row in the defined buffers. Does this help you?
regards, Philipp
Received on Fri Jul 02 1999 - 05:00:25 CDT
![]() |
![]() |