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

Home -> Community -> Usenet -> c.d.o.server -> Re: How to stop an OCI query?

Re: How to stop an OCI query?

From: <ctcgag_at_hotmail.com>
Date: 12 Aug 2003 16:12:36 GMT
Message-ID: <20030812121236.833$Os@newsreader.com>


ramon_at_conexus.net (Ramon F Herrera) wrote:
> What's the correct condition to check in order to stop
> a running OCI query? I have tried several approaches
> (see below) but I can't seem to find the right one.
>
> The following gives me too few records:

Let me guess, it gives about half the number of records it should?

> while ((result = OCIStmtFetch2(select, errhp, 1, OCI_FETCH_NEXT, 0,
> OCI_DEFAULT)) == OCI_SUCCESS) {
> OCIStmtFetch2(select, errhp, 1, OCI_FETCH_NEXT, 0, OCI_DEFAULT);
> // retrieve record
> }

You fetch a record. If it succeeds, you ignore that record and fetch another one (and don't check to see if the second fetch succeeds.)

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service              New Rate! $9.95/Month 50GB
Received on Tue Aug 12 2003 - 11:12:36 CDT

Original text of this message

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