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

More OCI Relational Functions, 7 of 106


OCIStmtPrepare2()

Purpose

This call prepares a SQL or PL/SQL statement for execution. The user has the option of using the statement cache, if it has been enabled.

Syntax

sword OCIStmtPrepare2 ( OCISvcCtx      *svchp,
                        OCIStmt        **stmthp,
                        OCIError       *errhp,
                        CONST OraText  *stmttext,
                        ub4            stmt_len,
                        CONST OraText  *key,
                        ub4            keylen,
                        ub4            language,
                        ub4            mode );

Parameters

svchp (IN)

The service context to be associated with the statement.

errhp (IN)

A pointer to the error handle for diagnostics.

stmthp (OUT)

Pointer to the statement handle returned.

stmttext (IN)

The statement text. The semantics of the stmttext are same as that of OCIStmtPrepare, i.e, the string should be null-terminated.

stmt_len (IN)

The statement text length.

key (IN)

For statement caching only. The key to the returned statement in the cache. This can be used for future calls to OCIStmtPrepare2(), in which case there is no need to pass in the statement text and related parameters. If the key is passed in, then the statement text and other parameters are ignored and the search is solely based on the key.

keylen (IN)

For statement caching only. The length of the key.

language (IN)

Specifies V7, or native syntax. Possible values are:

mode (IN)

This function can be used with and without statement caching. This is determined at the time of connection or session pool creation. If caching is enabled for a session, then all statements in the session will have caching enabled, and if caching is not enabled, then all statements will not be cached.

The valid modes are:

Related Functions

OCIStmtRelease()


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