Tải bản đầy đủ (.pdf) (1,570 trang)

Tài liệu Oracle Call Interface Programmer''''s Guide pdf

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (8.32 MB, 1,570 trang )

Oracle® Call Interface
Programmer's Guide
10g Release 1 (10.1)
Part No. B10779-01
December 2003
Oracle Call Interface Programmer's Guide, 10g Release 1 (10.1)
Part No. B10779-01
Copyright © 1996, 2003 Oracle Corporation. All rights reserved.
Primary Author: Jack Melnick
Contributors: A. Ahluwalia, C. Baird, A. Bande, D. Banerjee, S. Banerjee, M. Bastawala, E. Belden, Jenny
Chai, S. Chandiramani, S. Chandrasekar, Thomas H. Chang, D. Chatterjee, D. Chiba, L. Chidambaran, D.
Frumkin, J. Greenberg, W. He, N. Ikeda, S. Kaluskar, R. Kasamsetty, H. Kelly, S. Kotsovolos, S.
Krishnaswamy, Geoff Lee, R. Leyderman, Annie Liu, K. Mohan, E. Paapanen, R. Pingte, D. Saha, H.
Slattery, Steven Sun, A. Tarachandani, R. Thammaiah, B. Thome, B. Trute, A. Tsukerman, Wei Wang,
Daniel M. Wong, Longying Zhao
Graphic Designer: Valarie Moore
The Programs (which include both the software and documentation) contain proprietary information of
Oracle Corporation; they are provided under a license agreement containing restrictions on use and
disclosure and are also protected by copyright, patent and other intellectual and industrial property
laws. Reverse engineering, disassembly or decompilation of the Programs, except to the extent required
to obtain interoperability with other independently created software or as specified by law, is prohibited.
The information contained in this document is subject to change without notice. If you find any problems
in the documentation, please report them to us in writing. Oracle Corporation does not warrant that this
document is error-free. Except as may be expressly permitted in your license agreement for these
Programs, no part of these Programs may be reproduced or transmitted in any form or by any means,
electronic or mechanical, for any purpose, without the express written permission of Oracle Corporation.
If the Programs are delivered to the U.S. Government or anyone licensing or using the programs on
behalf of the U.S. Government, the following notice is applicable:
Restricted Rights Notice Programs delivered subject to the DOD FAR Supplement are "commercial
computer software" and use, duplication, and disclosure of the Programs, including documentation,
shall be subject to the licensing restrictions set forth in the applicable Oracle license agreement.


Otherwise, Programs delivered subject to the Federal Acquisition Regulations are "restricted computer
software" and use, duplication, and disclosure of the Programs shall be subject to the restrictions in FAR
52.227-19, Commercial Computer Software - Restricted Rights (June, 1987). Oracle Corporation, 500
Oracle Parkway, Redwood City, CA 94065.
The Programs are not intended for use in any nuclear, aviation, mass transit, medical, or other inherently
dangerous applications. It shall be the licensee's responsibility to take all appropriate fail-safe, backup,
redundancy, and other measures to ensure the safe use of such applications if the Programs are used for
such purposes, and Oracle Corporation disclaims liability for any damages caused by such use of the
Programs.
Oracle is a registered trademark, and Oracle8i, Oracle9i, PL/SQL, Pro*C/C++, Pro*COBOL,
Pro*FORTRAN, Oracle Store, Oracle7, and SQL*Net are trademarks or registered trademarks of Oracle
Corporation. Other names may be trademarks of their respective owners.
iii
Contents
Send Us Your Comments xxxv
Preface xxxvii
Audience xxxviii
Organization xxxviii
Related Documentation xlii
Conventions xliv
Documentation Accessibility xlvii
What's New in Oracle Call Interface? xlix
New Features in Oracle Call Interface Release 10.1 l
Oracle9i Release 2 (9.2) New Features in Oracle Call Interface lii
Oracle9i Release 1 (9.0.1) New Features in Oracle Call Interface liv
Oracle9i Release 9.0.0 New Features in Oracle Call Interface lvi
Volume 1
Part I OCI Relational Concepts
1 Introduction and Upgrading
Overview of OCI 1-2

Advantages of OCI 1-3
Building an OCI Application 1-3
Parts of OCI 1-4
iv
Procedural and Non-Procedural Elements 1-4
Object Support 1-5
SQL Statements 1-6
Encapsulated Interfaces 1-11
Simplified User Authentication and Password Management 1-11
Extensions to Improve Application Performance and Scalability 1-12
OCI Object Support 1-13
Client-Side Object Cache 1-13
Associative and Navigational Interfaces 1-13
OCI Runtime Environment for Objects 1-14
Type Management, Mapping and Manipulation Functions 1-15
Object Type Translator 1-15
OCI Support for Oracle Streams Advanced Queuing 1-16
XA Library Support 1-16
Compatibility and Upgrading 1-16
Simplified Upgrading of Existing OCI Release 7 Applications 1-16
Statically-Linked and Dynamically-Linked Applications 1-17
Obsolete OCI Routines 1-18
OCI Routines Not Supported 1-20
Compatibility Between Different Releases of OCI and Servers 1-20
Upgrading OCI 1-21
OCI Instant Client 1-22
Benefits of Instant Client 1-23
OCI Instant Client Installation Process 1-23
When to Use Instant Client 1-24
Patching Instant Client Shared Libraries 1-25

Regeneration of Data Shared Library 1-25
Database Connection Names for OCI Instant Client 1-25
Environment Variables for OCI Instant Client 1-26
2 OCI Programming Basics
Overview of OCI Programming 2-2
OCI Program Structure 2-2
OCI Data Structures 2-4
Handles 2-4
v
Allocating and Freeing Handles 2-6
Environment Handle 2-8
Error Handle 2-8
Service Context and Associated Handles 2-8
Statement, Bind, and Define Handles 2-10
Describe Handle 2-10
Complex Object Retrieval Handle 2-11
Thread Handle 2-11
Subscription Handle 2-11
Direct Path Handles 2-11
Connection Pool Handle 2-12
Handle Attributes 2-12
OCI Descriptors 2-13
Snapshot Descriptor 2-15
LOB and BFILE Locators 2-15
Parameter Descriptor 2-16
ROWID Descriptor 2-16
Date, Datetime, and Interval Descriptors 2-17
Complex Object Descriptor 2-17
Advanced Queuing Descriptors 2-17
User Memory Allocation 2-18

OCI Programming Steps 2-18
OCI Environment Initialization 2-19
Creating the OCI Environment 2-20
Allocating Handles and Descriptors 2-21
Application Initialization, Connection, and Session Creation 2-21
Processing SQL Statements in OCI 2-24
Commit or Rollback 2-24
Terminating the Application 2-25
Error Handling in OCI 2-26
Return and Error Codes for Data 2-27
Functions Returning Other Values 2-28
Additional Coding Guidelines 2-29
Parameter Types 2-29
Inserting Nulls into a Column 2-29
vi
Indicator Variables 2-30
Canceling Calls 2-32
Positioned Updates and Deletes 2-33
Reserved Words 2-33
Nonblocking Mode in OCI 2-35
Using PL/SQL in an OCI Program 2-37
OCI Globalization Support 2-39
Client Character Set Control from OCI 2-39
Code Example for Character Set Control in OCI 2-39
Character Control and OCI Interfaces 2-40
Character Length Semantics in OCI 2-40
Character Set Support in OCI 2-41
Other OCI Globalization Support Functions 2-41
Getting Locale Information in OCI 2-41
Example of Getting Locale Information in OCI 2-42

Manipulating Strings in OCI 2-43
Example of Manipulating Strings in OCI 2-43
Example of Classifying Characters in OCI 2-44
Converting Character Sets in OCI 2-45
Example of Converting Character Sets in OCI 2-45
OCI Messaging Functions 2-46
Example of Retrieving a Message from a Text Message File 2-47
lmsgen Utility 2-47
3 Datatypes
Oracle Datatypes 3-2
Using External Datatype Codes 3-4
Internal Datatypes 3-4
LONG, RAW, LONG RAW, VARCHAR2 3-6
Character Strings and Byte Arrays 3-6
UROWID 3-6
BINARY_FLOAT and BINARY_DOUBLE 3-7
External Datatypes 3-8
VARCHAR2 3-10
NUMBER 3-11
vii
INTEGER 3-12
FLOAT 3-13
STRING 3-13
VARNUM 3-14
LONG 3-15
VARCHAR 3-15
DATE 3-15
RAW 3-16
VARRAW 3-17
LONG RAW 3-17

UNSIGNED 3-17
LONG VARCHAR 3-17
LONG VARRAW 3-18
CHAR 3-18
CHARZ 3-19
Named Datatypes: Object, VARRAY, Nested Table 3-20
REF 3-20
ROWID Descriptor 3-21
LOB Descriptor 3-21
Datetime and Interval Datatype Descriptors 3-24
Native Float and Native Double 3-26
C Object-Relational Datatype Mappings 3-26
Data Conversions 3-27
Data Conversions for LOB Datatype Descriptors 3-29
Data Conversions for Datetime and Interval Datatypes 3-29
Datetime and Date Upgrading Rules 3-31
Data Conversion for BINARY_FLOAT and BINARY_DOUBLE in OCI 3-31
Typecodes 3-33
Relationship Between SQLT and OCI_TYPECODE Values 3-35
Definitions in oratypes.h 3-37
4 Using SQL Statements in OCI
Overview of SQL Statement Processing 4-2
Preparing Statements 4-4
Using Prepared Statements on Multiple Servers 4-5
viii
Binding Placeholders in OCI 4-5
Executing Statements 4-7
Execution Snapshots 4-8
Execution Modes of OCIStmtExecute() 4-8
Describing Select-list Items 4-11

Implicit Describe 4-12
Explicit Describe of Queries 4-15
Defining Output Variables in OCI 4-16
Fetching Results 4-16
Fetching LOB Data 4-17
Setting Prefetch Count 4-17
Scrollable Cursors in OCI 4-18
Example of Access on a Scrollable Cursor 4-20
5 Binding and Defining in OCI
Overview of Binding in OCI 5-2
Named Binds and Positional Binds 5-3
OCI Array Interface 5-4
Binding Placeholders in PL/SQL 5-4
Steps Used in OCI Binding 5-6
PL/SQL Block in an OCI Program 5-7
Advanced Bind Operations in OCI 5-9
Binding LOBs 5-10
Binding in OCI_DATA_AT_EXEC Mode 5-16
Binding Ref Cursor Variables 5-17
Overview of Defining in OCI 5-17
Steps Used in OCI Defining 5-18
Advanced OCI Defines 5-19
Advanced Define Operations in OCI 5-20
Defining LOB Output Variables 5-20
Defining PL/SQL Output Variables 5-22
Defining for a Piecewise Fetch 5-22
Binding and Defining Arrays of Structures in OCI 5-23
Skip Parameters 5-23
OCI Calls Used with Arrays of Structures 5-25
ix

Arrays of Structures and Indicator Variables 5-25
DML with RETURNING Clause in OCI 5-25
Using DML with RETURNING Clause 5-26
Binding RETURNING INTO variables 5-27
OCI Error Handling 5-28
DML with RETURNING REF INTO Clause in OCI 5-28
Additional Notes About OCI Callbacks 5-30
Array Interface for DML RETURNING Statements in OCI 5-30
Character Conversion in OCI Binding and Defining 5-30
Choosing Character Set 5-30
Setting Client Character Sets in OCI 5-32
Using OCI_ATTR_MAXDATA_SIZE Attribute 5-33
Using OCI_ATTR_MAXCHAR_SIZE Attribute 5-33
Buffer Expansion During OCI Binding 5-34
Constraint Checking During Defining 5-35
General Compatibility Issues for Character Length Semantics in OCI 5-36
PL/SQL REF CURSORs and Nested Tables in OCI 5-39
Runtime Data Allocation and Piecewise Operations in OCI 5-40
Valid Datatypes for Piecewise Operations 5-41
Types of Piecewise Operations 5-41
Providing INSERT or UPDATE Data at Runtime 5-42
Piecewise Operations with PL/SQL 5-45
Providing FETCH Information at Runtime 5-45
Piecewise Binds and Defines for LOBs 5-47
6 Describing Schema Metadata
Using OCIDescribeAny() 6-2
Limitations on OCIDescribeAny() 6-4
Notes on Types and Attributes 6-4
Parameter Attributes 6-5
Table Or View Parameters 6-7

Procedure, Function, Subprogram Attributes 6-8
Package Attributes 6-8
Type Attributes 6-8
Type Attribute Attributes 6-10
x
Type Method Attributes 6-11
Collection Attributes 6-12
Synonym Attributes 6-14
Sequence Attributes 6-14
Column Attributes 6-15
Argument and Result Attributes 6-17
List Attributes 6-19
Schema Attributes 6-19
Database Attributes 6-20
Rule Attributes 6-21
Rule Set Attributes 6-21
Evaluation Context Attributes 6-22
Table Alias Attributes 6-22
Variable Type Attributes 6-23
Name Value Attributes 6-23
Character Length Semantics Support in Describing 6-23
Implicit Describing 6-24
Explicit Describing 6-24
Examples Using OCIDescribeAny() 6-25
Retrieving Column Datatypes for a Table 6-25
Describing the Stored Procedure 6-27
Retrieving Attributes of an Object Type 6-29
Retrieving the Collection Element's Datatype of a Named Collection Type 6-31
Describing with Character Length Semantics 6-33
7 LOB and BFILE Operations

Using OCI Functions for LOBs 7-2
Creating and Modifying Persistent LOBs 7-2
Associating a BFILE in a Table with an Operating System File 7-3
LOB Attributes of an Object 7-3
Writing to a LOB Attribute of an Object 7-4
Transient Objects with LOB Attributes 7-4
Array Interface for LOBs 7-4
Using LOBs of Size Greater than 4 GB 7-5
New Functions for the Increased LOB Sizes 7-6
xi
Compatibility and Migration 7-7
LOB and BFILE Functions in OCI 7-10
Improving LOB Read/Write Performance 7-10
LOB Buffering Functions 7-11
Functions for Opening and Closing LOBs 7-12
LOB Read and Write Callbacks 7-14
Temporary LOB Support 7-17
Creating and Freeing Temporary LOBs 7-18
Temporary LOB Durations 7-19
Take Care When Assigning Pointers 7-20
Temporary LOB Example 7-20
8 Managing Scalable Platforms
OCI Support for Transactions 8-2
Levels of Transactional Complexity 8-2
Simple Local Transactions 8-3
Global Transactions 8-3
Transaction Examples 8-8
Initialization Parameters 8-8
Password and Session Management 8-10
OCI Authentication Management 8-10

OCI Password Management 8-12
OCI Session Management 8-12
Middle-Tier Applications in OCI 8-13
OCI Attributes for Middle-Tier Applications 8-14
OCI Middle-Tier Example 8-17
End-to-End Application Tracing 8-20
Externally Initialized Context in OCI 8-21
Externally Initialized Context Attributes in OCI 8-22
Using OCISessionBegin() with an Externally initialized Context 8-23
9 OCI Programming Advanced Topics
Overview of OCI Multithreaded Development 9-2
Advantages of OCI Thread Safety 9-2
OCI Thread Safety and Three-Tier Architectures 9-3
xii
Implementing Thread Safety 9-3
The OCIThread Package 9-4
Initialization and Termination 9-6
Passive Threading Primitives 9-7
Active Threading Primitives 9-9
Connection Pooling in OCI 9-10
OCI Connection Pooling Concepts 9-10
OCI Calls for Connection Pooling 9-12
Examples of OCI Connection Pooling 9-17
Session Pooling in OCI 9-17
Functionality of OCI Session Pooling 9-18
Homogeneous and Heterogeneous Session Pools 9-19
Using Tags in Session Pools 9-19
OCI Handles for Session Pooling 9-19
Using OCI Session Pooling 9-20
OCI Calls for Session Pooling 9-21

Example of OCI Session Pooling 9-23
When to Use Connection Pooling, Session Pooling, or Neither 9-23
Functions for Session Creation 9-24
Choosing Between Different Types of OCI Sessions 9-26
Statement Caching in OCI 9-27
Statement Caching without Session Pooling in OCI 9-27
Statement Caching with Session Pooling in OCI 9-28
Rules for Statement Caching in OCI 9-29
OCI Statement Caching Code Example 9-30
User-Defined Callback Functions in OCI 9-30
Registering User Callbacks in OCI 9-31
OCI Callbacks from External Procedures 9-40
Application Failover Callbacks in OCI 9-41
Failover Callback Overview 9-41
Failover Callback Structure and Parameters 9-42
Failover Callback Registration 9-43
Failover Callback Example 9-43
Handling OCI_FO_ERROR 9-45
OCI and Streams Advanced Queuing 9-48
xiii
OCI Streams Advanced Queuing Functions 9-48
OCI Streams Advanced Queuing Descriptors 9-49
Streams Advanced Queuing in OCI Versus PL/SQL 9-50
Publish-Subscribe Notification in OCI 9-54
Publish-Subscribe Registration Functions in OCI 9-56
Notification Callback in OCI 9-61
Notification Procedure 9-62
Publish-Subscribe Direct Registration Example 9-63
Publish-Subscribe LDAP Registration Example 9-69
Part II OCI Object Concepts

10 OCI Object-Relational Programming
OCI Object Overview 10-2
Working with Objects in OCI 10-3
Basic Object Program Structure 10-3
Persistent Objects, Transient Objects, and Values 10-5
Developing an OCI Object Application 10-7
Representing Objects in C Applications 10-8
Initializing Environment and Object Cache 10-9
Making Database Connections 10-10
Retrieving an Object Reference from the Server 10-10
Pinning an Object 10-11
Manipulating Object Attributes 10-13
Marking Objects and Flushing Changes 10-14
Fetching Embedded Objects 10-15
Object Meta-Attributes 10-17
Complex Object Retrieval 10-21
COR Prefetching 10-25
OCI Versus SQL Access to Objects 10-28
Pin Count and Unpinning 10-29
NULL Indicator Structure 10-30
Creating Objects 10-33
Freeing and Copying Objects 10-35
Object Reference and Type Reference 10-35
xiv
Creating Objects Based on Object Views or User-Defined OIDs 10-35
Error Handling in Object Applications 10-37
Type Inheritance 10-37
Substitutability 10-38
NOT INSTANTIABLE Types and Methods 10-39
OCI Support for Type Inheritance 10-39

OTT Support for Type Inheritance 10-41
Type Evolution 10-41
11 Object-Relational Datatypes in OCI
Overview of OCI Functions for Objects 11-2
Mapping Oracle Datatypes to C 11-2
OCI Type Mapping Methodology 11-4
Manipulating C Datatypes with OCI 11-4
Precision of Oracle Number Operations 11-6
Date (OCIDate) 11-6
Date Example 11-6
Datetime and Interval (OCIDateTime, OCIInterval) 11-8
Datetime Functions 11-9
Datetime Example 11-10
Interval Functions 11-11
Number (OCINumber) 11-13
Number Example 11-13
Fixed or Variable-Length String (OCIString) 11-15
String Functions 11-15
String Example 11-16
Raw (OCIRaw) 11-16
Raw Functions 11-16
Raw Example 11-17
Collections (OCITable, OCIArray, OCIColl, OCIIter) 11-17
Generic Collection Functions 11-18
Collection Data Manipulation Functions 11-18
Collection Scanning Functions 11-19
Varray/Collection Iterator Example 11-19
Nested Table Manipulation Functions 11-21
xv
Nested Table Locators 11-22

Multilevel Collection Types 11-22
Multilevel Collection Type Example 11-23
REF (OCIRef) 11-24
REF Manipulation Functions 11-24
REF Example 11-24
Object Type Information Storage and Access 11-25
Descriptor Objects 11-25
AnyType, AnyData and AnyDataSet Interfaces 11-26
Type Interfaces 11-27
OCIAnyData Interfaces 11-30
NCHAR Typecodes for OCIAnyData Functions 11-31
OCIAnyDataSet Interfaces 11-32
Binding Named Datatypes 11-32
Named Datatype Binds 11-32
Binding REFs 11-33
Information for Named Datatype and REF Binds 11-34
Defining Named Datatypes 11-35
Defining Named Datatype Output Variables 11-35
Defining REF Output Variables 11-35
Information for Named Datatype and REF Defines, and PL/SQL OUT Binds 11-36
Binding And Defining Oracle C Datatypes 11-38
Bind and Define Examples 11-39
Salary Update Examples 11-41
SQLT_NTY Bind/Define Example 11-44
Bind Example 11-44
Define Example 11-46
12 Direct Path Loading
Direct Path Loading Overview 12-2
Datatypes Supported for Direct Path Loading 12-3
Direct Path Handles 12-4

Direct Path Interface Functions 12-8
Limitations and Restrictions of the Direct Path Load Interface 12-9
Direct Path Load Example for Scalar Columns 12-9
xvi
Using a Date Cache in Direct Path Loading of Dates in OCI 12-15
Direct Path Loading of Object Types 12-17
Direct Path Loading of Nested Tables 12-17
Direct Path Loading of Column Objects 12-19
Direct Path Loading of SQL String Columns 12-22
Direct Path Loading of REF Columns 12-25
NOT FINAL Object and REF Columns 12-30
Direct Path Loading of Object Tables 12-32
Direct Path Loading a NOT FINAL Object Table 12-33
Direct Path Loading in Pieces 12-34
Loading Object Types in Pieces 12-34
Direct Path Context Handles and Attributes for Object Types 12-35
Direct Path Context Attributes 12-35
Direct Path Function Context and Attributes 12-36
Direct Path Column Parameter Attributes 12-40
Direct Path Function Column Array Handle for Non-scalar Columns 12-43
13 Object Advanced Topics in OCI
The Object Cache and Memory Management 13-2
Cache Consistency and Coherency 13-4
Object Cache Parameters 13-5
Object Cache Operations 13-6
Loading and Removing Object Copies 13-7
Making Changes to Object Copies 13-10
Synchronizing Object Copies with Server 13-11
Object Locking 13-13
Commit and Rollback in Object Applications 13-15

Object Duration 13-15
Memory Layout of an Instance 13-17
Object Navigation 13-18
Simple Object Navigation 13-18
OCI Navigational Functions 13-20
Pin/Unpin/Free Functions 13-20
Flush and Refresh Functions 13-21
Mark and Unmark Functions 13-21
xvii
Object Meta-Attribute Accessor Functions 13-22
Other Functions 13-22
Type Evolution and the Object Cache 13-23
OCI Support for XML 13-23
XML Context 13-24
XML Data on the Server 13-24
Using OCI XML DB Functions 13-24
14 Using the Object Type Translator with OCI
OTT Overview 14-2
What Is the Object Type Translator? 14-2
Creating Types in the Database 14-5
Invoking OTT 14-5
The OTT Command Line 14-6
OTT Command Line Invocation Example 14-6
The Intype File 14-9
OTT Datatype Mappings 14-10
Mapping Object Datatypes to C 14-12
OTT Type Mapping Example 14-13
Null Indicator Structs 14-16
OTT Support for Type Inheritance 14-17
The Outtype File 14-21

Using OTT with OCI Applications 14-22
Accessing and Manipulating Objects with OCI 14-23
Calling the Initialization Function 14-24
Tasks of the Initialization Function 14-26
OTT Reference 14-26
OTT Command Line Syntax 14-27
OTT Parameters 14-28
Where OTT Parameters Can Appear 14-33
Structure of the Intype File 14-34
Nested Included File Generation 14-36
SCHEMA_NAMES Usage 14-38
Default Name Mapping 14-41
OTT Restriction on File Name Comparison 14-42
xviii
Volume 2
Part III OCI Reference
15 OCI Relational Functions
Introduction to the Relational Functions 15-2
Connect, Authorize, and Initialize Functions 15-4
OCIConnectionPoolCreate() 15-5
OCIConnectionPoolDestroy() 15-8
OCIEnvCreate() 15-9
OCIEnvInit() 15-12
OCIEnvNlsCreate() 15-14
OCIInitialize() 15-18
OCILogoff() 15-21
OCILogon() 15-22
OCILogon2() 15-24
OCIServerAttach() 15-27
OCIServerDetach() 15-30

OCISessionBegin() 15-31
OCISessionEnd() 15-35
OCISessionGet() 15-36
OCISessionPoolCreate() 15-40
OCISessionPoolDestroy() 15-44
OCISessionRelease() 15-45
OCITerminate() 15-47
Handle and Descriptor Functions 15-48
OCIAttrGet() 15-49
OCIAttrSet() 15-52
OCIDescriptorAlloc() 15-54
OCIDescriptorFree() 15-57
OCIHandleAlloc() 15-59
OCIHandleFree() 15-62
OCIParamGet() 15-64
OCIParamSet() 15-66
Bind, Define, and Describe Functions 15-68
xix
OCIBindArrayOfStruct() 15-69
OCIBindByName() 15-71
OCIBindByPos() 15-77
OCIBindDynamic() 15-82
OCIBindObject() 15-87
OCIDefineArrayOfStruct() 15-90
OCIDefineByPos() 15-92
OCIDefineDynamic() 15-97
OCIDefineObject() 15-100
OCIDescribeAny() 15-102
OCIStmtGetBindInfo() 15-105
16 More OCI Relational Functions

Introduction to More Relational Functions 16-2
Statement Functions 16-4
OCIStmtExecute() 16-5
OCIStmtFetch() 16-9
OCIStmtFetch2() 16-11
OCIStmtGetPieceInfo() 16-14
OCIStmtPrepare() 16-16
OCIStmtPrepare2() 16-18
OCIStmtRelease() 16-20
OCIStmtSetPieceInfo() 16-21
LOB Functions 16-23
OCIDurationBegin() 16-26
OCIDurationEnd() 16-28
OCILobAppend() 16-29
OCILobAssign() 16-31
OCILobCharSetForm() 16-33
OCILobCharSetId() 16-34
OCILobClose() 16-35
OCILobCopy() 16-37
OCILobCopy2() 16-40
OCILobCreateTemporary() 16-41
OCILobDisableBuffering() 16-43
xx
OCILobEnableBuffering() 16-44
OCILobErase() 16-45
OCILobErase2() 16-47
OCILobFileClose() 16-48
OCILobFileCloseAll() 16-49
OCILobFileExists() 16-50
OCILobFileGetName() 16-51

OCILobFileIsOpen() 16-53
OCILobFileOpen() 16-55
OCILobFileSetName() 16-57
OCILobFlushBuffer() 16-59
OCILobFreeTemporary() 16-61
OCILobGetChunkSize() 16-62
OCILobGetLength() 16-64
OCILobGetLength2() 16-66
OCILobGetStorageLimit() 16-67
OCILobIsEqual() 16-68
OCILobIsOpen() 16-69
OCILobIsTemporary() 16-71
OCILobLoadFromFile() 16-72
OCILobLoadFromFile2() 16-74
OCILobLocatorAssign() 16-75
OCILobLocatorIsInit() 16-77
OCILobOpen() 16-79
OCILobRead() 16-81
OCILobRead2() 16-87
OCILobTrim() 16-92
OCILobTrim2() 16-94
OCILobWrite() 16-95
OCILobWrite2() 16-101
OCILobWriteAppend() 16-106
OCILobWriteAppend2() 16-110
Streams Advanced Queuing and Publish-Subscribe Functions 16-114
OCIAQDeq() 16-115
OCIAQDeqArray() 16-118
xxi
OCIAQEnq() 16-121

OCIAQEnqArray() 16-134
OCIAQListen() 16-136
OCISubscriptionDisable() 16-138
OCISubscriptionEnable() 16-140
OCISubscriptionPost() 16-142
OCISubscriptionRegister() 16-144
OCISubscriptionUnRegister() 16-147
Direct Path Loading Functions 16-149
OCIDirPathAbort() 16-150
OCIDirPathColArrayEntryGet() 16-151
OCIDirPathColArrayEntrySet() 16-153
OCIDirPathColArrayRowGet() 16-155
OCIDirPathColArrayReset() 16-157
OCIDirPathColArrayToStream() 16-158
OCIDirPathDataSave() 16-160
OCIDirPathFinish() 16-161
OCIDirPathFlushRow() 16-162
OCIDirPathLoadStream() 16-163
OCIDirPathPrepare() 16-165
OCIDirPathStreamReset() 16-167
Thread Management Functions 16-168
OCIThreadClose() 16-170
OCIThreadCreate() 16-171
OCIThreadHandleGet() 16-173
OCIThreadHndDestroy() 16-174
OCIThreadHndInit() 16-175
OCIThreadIdDestroy() 16-176
OCIThreadIdGet() 16-177
OCIThreadIdInit() 16-178
OCIThreadIdNull() 16-179

OCIThreadIdSame() 16-180
OCIThreadIdSet() 16-181
OCIThreadIdSetNull() 16-182
OCIThreadInit() 16-183
xxii
OCIThreadIsMulti() 16-184
OCIThreadJoin() 16-185
OCIThreadKeyDestroy() 16-186
OCIThreadKeyGet() 16-187
OCIThreadKeyInit() 16-188
OCIThreadKeySet() 16-190
OCIThreadMutexAcquire() 16-191
OCIThreadMutexDestroy() 16-192
OCIThreadMutexInit() 16-193
OCIThreadMutexRelease() 16-194
OCIThreadProcessInit() 16-195
OCIThreadTerm() 16-196
Transaction Functions 16-197
OCITransCommit() 16-198
OCITransDetach() 16-201
OCITransForget() 16-203
OCITransMultiPrepare() 16-204
OCITransPrepare() 16-205
OCITransRollback() 16-206
OCITransStart() 16-207
Miscellaneous Functions 16-215
OCIBreak() 16-216
OCIErrorGet() 16-217
OCILdaToSvcCtx() 16-220
OCIPasswordChange() 16-222

OCIReset() 16-225
OCIRowidToChar() 16-226
OCIServerVersion() 16-227
OCISvcCtxToLda() 16-229
OCIUserCallbackGet() 16-231
OCIUserCallbackRegister() 16-234
17 OCI Navigational and Type Functions
Introduction to the Navigational and Type Functions 17-2
OCI Flush or Refresh Functions 17-8
xxiii
OCICacheFlush() 17-9
OCICacheRefresh() 17-11
OCIObjectFlush() 17-13
OCIObjectRefresh() 17-15
OCI Mark or Unmark Object and Cache Functions 17-17
OCICacheUnmark() 17-18
OCIObjectMarkDelete() 17-19
OCIObjectMarkDeleteByRef() 17-21
OCIObjectMarkUpdate() 17-22
OCIObjectUnmark() 17-24
OCIObjectUnmarkByRef() 17-25
OCI Get Object Status Functions 17-26
OCIObjectExists() 17-27
OCIObjectGetProperty() 17-28
OCIObjectIsDirty() 17-32
OCIObjectIsLocked() 17-33
OCI Miscellaneous Object Functions 17-34
OCIObjectCopy() 17-35
OCIObjectGetAttr() 17-38
OCIObjectGetInd() 17-40

OCIObjectGetObjectRef() 17-41
OCIObjectGetTypeRef() 17-42
OCIObjectLock() 17-43
OCIObjectLockNoWait() 17-44
OCIObjectNew() 17-46
OCIObjectSetAttr() 17-50
OCI Pin, Unpin, and Free Functions 17-52
OCICacheFree() 17-53
OCICacheUnpin() 17-54
OCIObjectArrayPin() 17-55
OCIObjectFree() 17-57
OCIObjectPin() 17-59
OCIObjectPinCountReset() 17-62
OCIObjectPinTable() 17-64
OCIObjectUnpin() 17-66
xxiv
OCI Type Information Accessor Functions 17-68
OCITypeArrayByName() 17-69
OCITypeArrayByRef() 17-72
OCITypeByName() 17-74
OCITypeByRef() 17-77
Volume 3
18 OCI Datatype Mapping and Manipulation Functions
Introduction to Datatype Mapping and Manipulation Functions 18-2
OCI Collection and Iterator Functions 18-5
OCICollAppend() 18-6
OCICollAssign() 18-8
OCICollAssignElem() 18-10
OCICollGetElem() 18-12
OCICollGetElemArray() 18-15

OCICollIsLocator() 18-17
OCICollMax() 18-18
OCICollSize() 18-19
OCICollTrim() 18-21
OCIIterCreate() 18-22
OCIIterDelete() 18-24
OCIIterGetCurrent() 18-25
OCIIterInit() 18-27
OCIIterNext() 18-29
OCIIterPrev() 18-31
OCI Date, Datetime, and Interval Functions 18-33
OCIDateAddDays() 18-36
OCIDateAddMonths() 18-37
OCIDateAssign() 18-38
OCIDateCheck() 18-39
OCIDateCompare() 18-41
OCIDateDaysBetween() 18-42
OCIDateFromText() 18-43
OCIDateGetDate() 18-45
xxv
OCIDateGetTime() 18-46
OCIDateLastDay() 18-47
OCIDateNextDay() 18-48
OCIDateSetDate() 18-50
OCIDateSetTime() 18-51
OCIDateSysDate() 18-52
OCIDateToText() 18-53
OCIDateTimeAssign() 18-55
OCIDateTimeCheck() 18-57
OCIDateTimeCompare() 18-59

OCIDateTimeConstruct() 18-61
OCIDateTimeConvert() 18-63
OCIDateTimeFromArray() 18-65
OCIDateTimeFromText() 18-67
OCIDateTimeGetDate() 18-69
OCIDateTimeGetTime() 18-71
OCIDateTimeGetTimeZoneName() 18-73
OCIDateTimeGetTimeZoneOffset() 18-75
OCIDateTimeIntervalAdd() 18-77
OCIDateTimeIntervalSub() 18-79
OCIDateTimeSubtract() 18-81
OCIDateTimeSysTimeStamp() 18-82
OCIDateTimeToArray() 18-83
OCIDateTimeToText() 18-85
OCIDateZoneToZone() 18-87
OCIIntervalAdd() 18-89
OCIIntervalAssign() 18-91
OCIIntervalCheck() 18-92
OCIIntervalCompare() 18-94
OCIIntervalDivide() 18-96
OCIIntervalFromNumber() 18-97
OCIIntervalFromText() 18-98
OCIIntervalFromTZ() 18-100
OCIIntervalGetDaySecond() 18-102
OCIIntervalGetYearMonth() 18-104

×