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 Cartridge Functions, 11 of 43


OCIContextSetValue()

Purpose

This call is used to save a value (or address) for a particular duration.

Syntax

sword OCIContextSetValue( dvoid       *hndl, 
                          OCIError    *err, 
                          OCIDuration duration, 
                          ub1         *key, 
                          ub1         keylen, 
                          dvoid       *ctx_value );

Parameters

hndl (IN)

The OCI environment or user session handle.

err (IN)

The error handle.

duration (IN)

One of the following (a previously created user duration):

OCI_DURATION_STATEMENT

OCI_DURATION_SESSION

key (IN)

Unique key value.

keylen (IN)

Length of the key. Maximum is 64 bits.

ctx_value (IN)

Pointer that will be saved in the context.

Comments

The context value being stored must be allocated out of memory of duration greater than or equal to the duration being passed in. The key being passed in should be unique in this session. Trying to save a context value under the same key and duration again will result in overwriting the old context value with the new one. Typically, a client will allocate a structure, store its address in the context using this call, and get this address in a separate call using OCIContextGetValue(). The (key, value) association can be explicitly removed by calling OCIContextClearValue() or else it will go away at the end of the duration.

Returns


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