Oracle Call Interface Programmer's Guide Release 2 (9.2) Part Number A96584-01 |
|
OCI Relational Functions, 31 of 38
This call is used to register user callbacks for dynamic data allocation.
sword OCIBindDynamic ( OCIBind *bindp, OCIError *errhp, dvoid *ictxp, OCICallbackInBind (icbfp)(/*_ dvoid *ictxp, OCIBind *bindp, ub4 iter, ub4 index, dvoid **bufpp, ub4 *alenp, ub1 *piecep, dvoid **indpp */), dvoid *octxp, OCICallbackOutBind (ocbfp)(/*_ dvoid *octxp, OCIBind *bindp, ub4 iter, ub4 index, dvoid **bufpp, ub4 **alenpp, ub1 *piecep, dvoid **indpp, ub2 **rcodepp _*/) );
A bind handle returned by a call to OCIBindByName()
or OCIBindByPos()
.
An error handle you can pass to OCIErrorGet()
for diagnostic information in the event of an error.
The context pointer required by the call back function icbfp
.
The callback function which returns a pointer to the IN bind value or piece at run time. The callback takes in the following parameters:
curelep
parameter of the bind call.*bufpp
contains a pointer to the descriptor. For example if you defineOCILOBLocator *lobp;
then you would set *bufpp
to lobp
not *lobp
.
For REF
s, pass the address of the ref; that is, pass &my_ref
for *bufpp
.
If the OCI_ATTR_CHARSET_ID attribute is set to OCI_UTF16ID (replaces the deprecated OCI_UCS2ID, which is retained for backward compatibility), all data passed to and received with the corresponding bind call is assumed to be in UTF-16 encoding.
sizeof(OCILobLocator *)
.The context pointer required by the callback function ocbfp
.
The callback function which returns a pointer to the OUT bind value or piece at run time. The callback takes in the following parameters:
curelep
parameter of the bind call.This call is used to register user-defined callback functions for providing or receiving data if OCI_DATA_AT_EXEC mode was specified in a previous call to OCIBindByName()
or OCIBindByPos()
.
The callback function pointers must return OCI_CONTINUE if it the call is successful. Any return code other than OCI_CONTINUE signals that the client wishes to abort processing immediately.
See Also:
For more information about the OCI_DATA_AT_EXEC mode, see the section "Runtime Data Allocation and Piecewise Operations". |
When passing the address of a storage area, make sure that the storage area will exist even after the application returns from the callback. This means that you should not allocate such storage on the stack.
Note: After using |
|
Copyright © 1996, 2002 Oracle Corporation. All Rights Reserved. |
|