|Oracle Call Interface Programmer's Guide
Part Number A89857-01
OCI Relational Functions, 35 of 39
Fetches rows from a query. Users are encouraged to use the new fetch call
OCIStmtFetch2(). This call is deprecated.
A statement (application request) handle.
An error handle you can pass to
OCIErrorGet() for diagnostic information in the event of an error.
Number of rows to be fetched from the current position.
Prior to release 9.0, the only acceptable value is OCI_FETCH_NEXT, which is also the default value.
Pass as OCI_DEFAULT.
The fetch call is a local call, if prefetched rows suffice. However, this is transparent to the application.
If LOB columns are being read, LOB locators are fetched for subsequent LOB operations to be performed on these locators. Prefetching is turned off if
LONG columns are involved.
This function can return OCI_NO_DATA on EOF and OCI_SUCCESS_WITH_INFO when one of the following errors occur:
NULLcolumn in an aggregate function
If you call
OCIStmtFetch() with the
nrows parameter set to zero, this cancels the cursor.
Use OCI_ATTR_ROWS_FETCHED to find the number of rows that were successfully fetched into the user's buffers in the last fetch call.