|Oracle Call Interface Programmer's Guide
Part Number A89857-01
OCI Relational Functions, 30 of 39
This call is used to set the additional attributes required if the OCI_DYNAMIC_FETCH mode was selected in
sword OCIDefineDynamic ( OCIDefine *defnp, OCIError *errhp, dvoid *octxp, OCICallbackDefine (ocbfp)(/*_ dvoid *octxp, OCIDefine *defnp, ub4 iter, dvoid **bufpp, ub4 **alenpp, ub1 *piecep, dvoid **indpp, ub2 **rcodep _*/) );
The handle to a define structure returned by a call to
An error handle you can pass to
OCIErrorGet() for diagnostic information in the event of an error.
Points to a context for the callback function.
Points to a callback function. This is invoked at runtime to get a pointer to the buffer into which the fetched data or a piece of it will be retrieved. The callback also specifies the indicator, the return code and the lengths of the data piece and indicator.
When working with callback parameters, it is important to keep in mind what is meant by IN and OUT for the parameter mode. Normally, in an OCI function, an IN parameter refers to data being passed to Oracle, and an OUT parameter refers to data coming back from Oracle. In the case of callbacks, this is reversed. IN means data is coming from Oracle into the callback, and OUT means data is coming out of the callback and going to Oracle.
The callback parameters are listed below:
A context pointer passed as an argument to all the callback functions.
The define handle.
Which row of this current fetch; 0-based.
Returns a pointer to a buffer to store the column value, that is,
*bufpp points to some appropriate storage for the column value.
Used by the application to set the size of the storage it is providing in
*bufpp. After data is fetched into the buffer,
alenpp indicates the actual size of the data in bytes.
Returns a piece value from the callback (application) to Oracle, as follows:
Indicator variable pointer
Return code variable pointer
This call is used to set the additional attributes required if the OCI_DYNAMIC_FETCH mode has been selected in a call to
OCIDefineByPos(). If OCI_DYNAMIC_FETCH mode was selected, and the call to
OCIDefineDynamic() is skipped, then the application can fetch data piecewise using OCI calls (
). For more information about OCI_DYNAMIC_FETCH mode, see the section "Runtime Data Allocation and Piecewise Operations".
Oracle9i Application Developer's Guide - Fundamentals, the chapter on Establishing Security Policies