Oracle Call Interface Programmer's Guide Release 2 (9.2) Part Number A96584-01 |
|
OCI Any Type and Data Functions, 8 of 26
Gets the value of the attribute at the current position in the OCIAnyData. Attribute values can be accessed sequentially.
sword OCIAnyDataAttrGet ( OCISvcCtx *svchp, OCIError *errhp, OCIAnyData *sdata, OCITypeCode tc, OCIType *attr_type, dvoid *null_ind, dvoid *attr_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()
.
Pointer to initialized of type OCIAnyData.
Typecode of the attribute. Type checking happens based on tc
, attr_type
and the type information in the OCIAnyData.
attr_type
should give the type description of the referenced type (for OCI_TYPECODE_REF) or the type description of the collection type (for OCI_TYPECODE_VARRAY, OCI_TYPECODE_TABLE) or the type description of the object (for OCI_TYPECODE_OBJECT). This parameter is not required for built-in typecodes.
Indicates if the attr_value
is NULL. Pass (OCIInd *)
in null_ind
for all typecodes except OCI_TYPECODE_OBJECT.
If the typecode is OCI_TYPECODE_OBJECT, pass a pointer (dvoid **)
in null_ind
.
The indicator returned will be OCI_IND_NOTNULL if the value is not NULL and it will be OCI_IND_NULL for a NULL value.
Value for the attribute
Currently, this parameter is ignored. Pass 0 here. In the future, this may be used for certain typecodes where the data representation itself will not give the length, in bytes, implicitly.
Is attribute to be returned in the form of OCIAnyData?
This call can be used with OCIAnyData of typecode OCI_TYPECODE_OBJECT only
tc
must match the type of the attribute at the current position, otherwise an error is returned.is_any
is applicable only when the typecode of the attribute is one of the following:
If is_any
is TRUE, then attr_value
is returned in the form of OCIAnyData*.
OCIObjectNew()
. In case of built-in types such as NUMBER
, VARCHAR
, etc, the attribute can be just a pointer to a stack variable. Here is the list of available Oracle datatypes which can be used as object attribute types and the corresponding types of the attribute value that should be passed:
|
Copyright © 1996, 2002 Oracle Corporation. All Rights Reserved. |
|