Oracle Call Interface Programmer's Guide Release 9.0.1 Part Number A89857-01 |
|
OCI Relational Functions, 19 of 39
This call returns a pointer to an allocated and initialized handle.
sword OCIHandleAlloc ( CONST dvoid *parenth, dvoid **hndlpp, ub4 type, size_t xtramem_sz, dvoid **usrmempp );
An environment handle.
Returns a handle.
Specifies the type of handle to be allocated. The allowed types are:
Specifies an amount of user memory to be allocated.
Returns a pointer to the user memory of size xtramem_sz
allocated by the call for the user.
Returns a pointer to an allocated and initialized handle, corresponding to the type specified in type
. A non-null handle is returned on success. All handles are allocated with respect to an environment handle which is passed in as a parent handle.
No diagnostics are available on error. This call returns OCI_SUCCESS if successful, or OCI_INVALID_HANDLE if an error occurs.
Handles must be allocated using OCIHandleAlloc()
before they can be passed into an OCI call.
To allocate and initialize an environment handle, call OCIEnvInit()
.
See Also:
For more information about using the |
The following sample code shows OCIHandleAlloc()
being used to allocate a variety of handles at the beginning of an application:
OCIHandleAlloc( (dvoid *) envhp, (dvoid **) &errhp, (ub4) OCI_HTYPE_ERROR, 0, (dvoid **) &tmp); OCIHandleAlloc( (dvoid *) envhp, (dvoid **) &srvhp, (ub4) OCI_HTYPE_SERVER, 0, (dvoid **) &tmp); OCIHandleAlloc( (dvoid *) envhp, (dvoid **) &svchp, (ub4) OCI_HTYPE_SVCCTX, 0, (dvoid **) &tmp);
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|