Skip Headers

Oracle Call Interface Programmer's Guide
Release 2 (9.2)

Part Number A96584-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

OCI Navigational and Type Functions, 24 of 36


OCIObjectSetAttr()

Purpose

Set an object attribute.

Syntax

sword OCIObjectSetAttr ( OCIEnv              *env, 
                         OCIError            *err, 
                         dvoid               *instance, 
                         dvoid               *null_struct, 
                         struct OCIType      *tdo, 
                         CONST OraText       **names, 
                         CONST ub4           *lengths, 
                         CONST ub4           name_count,
                         CONST ub4           *indexes, 
                         CONST ub4           index_count, 
                         CONST OCIInd        null_status, 
                         CONST dvoid         *attr_null_struct,
                         CONST dvoid         *attr_value );

Parameters

env (IN/OUT)

The OCI environment handle initialized in object mode. See the description of OCIEnvCreate() and OCIInitialize() for more information.

err (IN/OUT)

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().

instance (IN)

Pointer to an object instance.

null_struct (IN)

The null structure of the object instance or array.

tdo (IN)

Pointer to the TDO.

names (IN)

Array of attribute names. This is used to specify the names of the attributes in the path expression.

lengths (IN)

Array of lengths of attribute names, in bytes.

name_count (IN)

Number of element in the array names.

indexes (IN) [optional]

Not currently supported. Pass as (ub4 *)0.

index_count (IN) [optional]

Not currently supported. Pass as (ub4)0.

attr_null_status (IN)

The null status of the attribute if the type of attribute is primitive.

attr_null_struct (IN)

The null structure of an object or collection attribute.

attr_value (IN)

Pointer to the attribute value.

Comments

This function sets the attribute of the given object with the given value. The position of the attribute is specified as a path expression which is an array of names and an array of indexes.

Example

For the path expression stanford.cs.stu[5].addr, the arrays will look like:

names = {"stanford", "cs", "stu", "addr"}

lengths = {8, 2, 3, 4}

indexes = {5}

Related Functions

OCIObjectGetAttr()

OCI Pin, Unpin, and Free Functions

This section describes the OCI pin unpin, and free functions.

Table 17-6 Pin, Unpin, and Free Functions
Function/Page Purpose

OCICacheFree()

Free objects in the cache

OCICacheUnpin()

Unpin persistent objects in cache or connection

OCIObjectArrayPin()

Pin an array of references

OCIObjectFree()

Free a previously allocated object

OCIObjectPin()

Pin an object

OCIObjectPinCountReset()

Unpin an object to zero pin count

OCIObjectPinTable()

Pin a table object with a given duration

OCIObjectUnpin()

Unpin an object


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback