Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to stop an OCI query?
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 50GBReceived on Tue Aug 12 2003 - 11:12:36 CDT