Oracle Call Interface Programmer's Guide Release 2 (9.2) Part Number A96584-01 |
|
OCI Any Type and Data Functions, 12 of 26
Accesses sequentially the elements in the collection attribute at the current position in the OCIAnyData.
sword OCIAnyDataCollGetElem ( OCISvcCtx *svchp, OCIError *errhp, OCIAnyData *sdata, OCITypeCode collelem_tc, OCIType *collelem_type, dvoid *null_ind, dvoid *collelem_value, ub4 *length, boolean is_any );
The OCI service context.
The OCI error handle. If there is an error, it is recorded in err
and this function returns OCI_ERROR. Obtain diagnostic information by calling OCIErrorGet()
.
Initialized OCIAnyData.
The typecode of the collection element to be retrieved. Type checking happens based on collelem_tc
, collelem_type
and the type information in the OCIAnyData.
OPTIONAL
collelem_type
will give the type description of the referenced type (for OCI_TYPECODE_REF) and it will give the type description of the collection type (for OCI_TYPECODE_NAMEDCOLLECTION) and it will give the type description of the object (for OCI_TYPECODE_OBJECT).
This parameter is not required for built-in typecodes.
Indicates if the collelem_value
is NULL. Pass an (OCIInd *)
for all typecodes except OCI_TYPECODE_OBJECT. The indicator should be OCI_IND_NOTNULL if the value is not NULL and it should be OCI_IND_NULL for a NULL value.
If the typecode is OCI_TYPECODE_OBJECT, pass a pointer (dvoid **)
to the indicator struct of the collelem_value
as the argument here.
Value for the collection element
Length of the collection element. Currently ignored. Set to 0 on input.
Is attr_value
to be returned in the form of OCIAnyData?
The OCIAnyData data can also correspond to a top level collection. If the OCIAnyData is of type OCI_TYPECODE_OBJECT, the attribute at the current position must be a collection of appropriate type. Otherwise, an error is returned.
As for OCIAnyDataAttrGet()
, the is_any
parameter is applicable only if collelem_tc
typecode is that OCI_TYPECODE_OBJECT. If is_any
is TRUE
, the attr_value
will be in the form of OCIAnyData *
.
This call returns OCI_NO_DATA when the end of the collection has been reached. It returns OCI_SUCCESS upon success and OCI_ERROR upon error.
See OCIAnyDataAttrGet()
) for the type of attribute to be passed in for all the possible types of the collection elements.
|
Copyright © 1996, 2002 Oracle Corporation. All Rights Reserved. |
|