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

Home -> Community -> Usenet -> c.d.o.misc -> Re: OCI cursor

Re: OCI cursor

From: Philipp Florschutz <pf_at_gmx.net>
Date: 2 Jul 1999 10:00:25 GMT
Message-ID: <7li2jp$c29$1@black.news.nacamar.net>


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

Original text of this message

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