Go to main content
2/93
List of Examples
3-1 Using the OCI_ATTR_USERNAME Attribute to Set the User Name in the Session Handle
3-2 Returning Describe Information in the Statement Handle Relating to Select-List Items
3-3 Using the OCILogon2 Call for a Single User Session
3-4 Enabling a Local User to Serve as a Proxy for Another User
3-5 Connection String to Use for the Proxy User
3-6 Preserving Case Sensitivity When Enabling a Local User to Serve as a Proxy for Another User
3-7 Preserving Case Sensitivity in the Connection String
3-8 Using "dilbert[mybert]" in the Connection String
3-9 Using "dilbert[mybert]"["joe[myjoe]"] in the Connection String
3-10 Setting the Target User Name
3-11 Using OCI to Set the OCI_ATTR_PROXY_CLIENT Attribute and the Proxy dilbert
3-12 Creating and Initializing an OCI Environment
3-13 Getting Locale Information in OCI
3-14 Basic String Manipulation in OCI
3-15 Classifying Characters in OCI
3-16 Converting Character Sets in OCI
3-17 Retrieving a Message from a Text Message File
4-1 OCI Bind and Define Support for 64-Bit Integers
4-2 Binding 8-Byte Integer Data Types for OUT Binds of a DML Returning Statement
5-1 Binding Both Input and Output Variables in Nonquery Operations
5-2 Using Batch Error Execution Mode
5-3 Implicit Describe - Select List Is Available as an Attribute of the Statement Handle
5-4 Explicit Describe - Returning the Select-List Description for Each Column
5-5 Access on a Scrollable Cursor
6-1 Handle Allocation and Binding for Each Placeholder in a SQL Statement
6-2 Defining a PL/SQL Statement to Be Used in OCI
6-3 Binding the Placeholder and Executing the Statement to Insert a Single Locator
6-4 Binding the Placeholder and Executing the Statement to Insert an Array of Locators
6-5 Allowed: Inserting into C1, C2, and L Columns Up to 8000, 8000, and 2000 Byte-Sized Bind Variable Data Values, Respectively
6-6 Allowed: Inserting into C1 and L Columns up to 2000 and 8000 Byte-Sized Bind Variable Data Values, Respectively
6-7 Allowed: Updating C1, C2, and L Columns up to 8000, 8000, and 2000 Byte-Sized Bind Variable Data Values, Respectively
6-8 Allowed: Updating C1, C2, and L Columns up to 2000, 2000, and 8000 Byte-Sized Bind Variable Data Values, Respectively
6-9 Allowed: Piecewise, Callback, and Array Insert or Update Operations
6-10 Not Allowed: Inserting More Than 4000 Bytes into Both LOB and LONG Columns Using the Same INSERT Statement
6-11 Allowed: Inserting into the CT3 LOB Column up to 2000 Byte-Sized Bind Variable Data Values
6-12 Not Allowed: Binding Any Length Data to a LOB Column in an Insert As Select Operation
6-13 Defining a Scalar Output Variable Following an Execute and Describe Operation
6-14 Defining LOBs Before Execution
6-15 Defining LOBs After Execution
6-16 Using Multiple Bind and Define Buffers
6-17 Binding the REF Output Variable in an OCI Application
6-18 Setting the Client Character Set to OCI_UTF16ID in OCI
6-19 Insert and Select Operations Using the OCI_ATTR_MAXCHAR_SIZE Attribute
6-20 Binding and Defining UTF-16 Data
6-21 Binding the :cursor1 Placeholder to the Statement Handle stm2p as a REF CURSOR
6-22 Defining a Nested Table (Second Position) as a Statement Handle
7-1 Initializing the OCI Process in Object Mode
7-2 Using an Explicit Describe to Retrieve Column Data Types for a Table
7-3 Describing the Stored Procedure
7-4 Using an Explicit Describe on a Named Object Type
7-5 Using an Explicit Describe on a Named Collection Type
7-6 Using a Parameter Descriptor to Retrieve the Data Types, Column Names, and Character-Length Semantics
7-7 Checking for Invisible Columns
8-1 Implementing Read Callback Functions Using OCILobRead2()
8-2 Implementing Write Callback Functions Using OCILobWrite2()
8-3 Using Temporary LOBs
8-4 Prefetching of LOB Data, Length, and Chunk Size
9-1 Defining the OCI_ATTR_SERVER_GROUP Attribute to Pass the Server Group Name
9-2 Defining the OCI_ATTR_PROXY_CREDENTIALS Attribute to Specify the Credentials of the Application Server for Client Authentication
9-3 Defining the OCI_ATTR_DISTINGUISHED_NAME Attribute to Pass the Distinguished Name of the Client
9-4 Defining the OCI_ATTR_CERTIFICATE Attribute to Pass the Entire X.509 Certificate
9-5 Defining the OCI_ATTR_INITIAL_CLIENT_ROLES Attribute to Pass the Client Roles
9-6 Defining the OCI_ATTR_CLIENT_IDENTIFIER Attribute to Pass the End-User Identity
9-7 Defining the OCI_ATTR_PASSWORD Attribute to Pass the Password for Validation
9-8 OCI Attributes That Let You Specify the External Name and Initial Privileges of a Client
9-9 Defining the OCI_ATTR_APPCTX_SIZE Attribute to Initialize the Context Array Size with the Desired Number of Context Attributes
9-10 Using the OCI_ATTR_APPCTX_LIST Attribute to Get a Handle on the Application Context List Descriptor for the Session
9-11 Calling OCIParamGet() to Obtain an Individual Descriptor for the i-th Application Context Using the Application Context List Descriptor
9-12 Defining Session Handle Attributes to Set Externally Initialized Context
9-13 Using the OCI_ATTR_CALL_TIME Attribute to Get the Elapsed Time of the Last Server Call
9-14 Using OCISessionBegin() with an Externally Initialized Context
9-15 Changing the "responsibility" Attribute Value in the CLIENTCONTEXT Namespace
9-16 Two Ways to Clear Specific Attribute Information in a Client Namespace
9-17 Clearing All the Context Information in a Specific Client Namespace
9-18 Calling OCIAttrSet() to Set the OCI_ATTR_EDITION Attribute
10-1 Example of PL/SQL Fix-Up Callback
10-2 Optimizing Bind and Define Operations on Statements in the Cache
10-3 Pseudocode That Describes the Overall Processing of a Typical OCI Call
10-4 Environment Variable Setting for the ORA_OCI_UCBPKG Variable
10-5 Specifying the pkgNInit() and PkgNEnvCallback() Functions
10-6 Using pkgNEnvCallback() to Register Entry, Replacement, and Exit Callbacks
10-7 Registering User Callbacks with the NULL ucbDesc
10-8 Using the OCIStmtPrepare() Call to Call the Callbacks in Order
10-9 User-Defined Failover Callback Function Definition
10-10 Failover Callback Registration
10-11 Failover Callback Unregistration
10-12 Callback Function That Implements a Failover Strategy
10-13 Event Notification
10-14 Transaction Guard Demo Program
10-15 Enqueue Buffered Messaging
10-16 Dequeue Buffered Messaging
10-17 Setting QOS Levels, the Notification Grouping Class, Value, and Type, and the Namespace Specific Context
10-18 Using AQ Grouping Notification Attributes in an OCI Notification Callback
10-19 Implementing a Publish Subscription Notification
10-20 Registering for Notification Using Callback Functions
10-21 LDAP Registration
11-1 Calling OCIDBStartup() to Perform a Database Startup Operation
11-2 Calling OCIDBShutdown() in OCI_DBSHUTDOWN_FINAL Mode
11-3 Calling OCIDBShutdown() in OCI_DBSHUTDOWN_ABORT Mode
11-4 Implicit Fetching of ROWIDs
11-5 DBMS_SQL RETURN_RESULT Subprogram
11-6 A PL/SQL Stored Procedure to Implicitly Return Result-Sets (Cursors) to the Client
11-7 An Anonymous PL/SQL Block to Implicitly Return Result-Sets (Cursors) to the Client
11-8 Using OCIStmtGetNextResult() to Retrieve and Process the Implicit Results Returned by Either a PL/SQL Stored Procedure or Anonymous Block
12-1 SQL Definition of Standalone Objects
12-2 SQL Definition of Embedded Objects
12-3 Pinning an Object
12-4 Manipulating Object Attributes in OCI
12-5 Using Complex Object Retrieval in OCI
12-6 C Representations of Types with Their Corresponding NULL Indicator Structures
12-7 Creating a New Object for an Object View
13-1 Manipulating an Attribute of Type OCIDate
13-2 Manipulating an Attribute of Type OCIDateTime
13-3 Manipulating an Attribute of Type OCINumber
13-4 Converting Values in OCINumber Format Returned from OCIDescribeAny() Calls to Unsigned Integers
13-5 Manipulating an Attribute of Type OCIString
13-6 Manipulating an Attribute of Type OCIRaw
13-7 Using Collection Data Manipulation Functions
13-8 Using Multilevel Collection Data Manipulation Functions
13-9 Using REF Manipulation Functions
13-10 Using Type Interfaces to Construct Object Types
13-11 Using Type Interfaces to Construct Collection Types
13-12 Using Special Construction and Access Calls for Improved Performance
13-13 Method 1 for a Salary Update: Fetch, Convert, and Assign
13-14 Method 2 for a Salary Update: Fetch and Assign, No Convert
13-15 Method 3 for a Salary Update: Direct Fetch
13-16 Using the SQLT_NTY Bind Call Including OCIBindObject()
13-17 Using the SQLT_NTY Define Call Including OCIDefineObject()
14-1 Direct Path Programs Must Include the Header Files
14-2 Passing the Handle Type to Allocate the Function Context
14-3 Explicit Allocation of Direct Path Column Array Handle
14-4 Explicit Allocation of Direct Path Function Column Array Handle
14-5 Allocating a Direct Path Stream Handle
14-6 Data Structures Used in Direct Path Loading Examples
14-7 Contents of the Header File cdemodp.h
14-8 Use of OCI Direct Path Interfaces
14-9 Allocating the Column Array and Stream Handles
14-10 Getting the Number of Rows and Columns
14-11 Setting Input Data Fields
14-12 Resetting the Column Array State
14-13 Resetting the Stream State
14-14 Converting Data to Stream Format
14-15 Loading the Stream
14-16 Finishing the Direct Path Load Operation
14-17 Freeing the Direct Path Handles
14-18 Allocating a Child Column Array for a Column Object
14-19 Allocating a Child Column Array for a SQL String Column
14-20 Allocating a Child Column Array for a REF Column
14-21 Allocating the Column Array for the Object Table
14-22 Specifying Values for the OCI_ATTR_DIRPATH_EXPR_TYPE Attribute
14-23 Setting a Function Context as a Column Attribute
14-24 Allocating a Child Column Array for a Function Context
15-1 Object Type Representation of a Department Row
15-2 C Representation of a Department Row
15-3 Initializing and Terminating XML Context with a C API
16-1 Definition of the Employee Object Type Listed in the Intype File
16-2 Contents of the Generated Header File demo.h
16-3 Contents of the demov.c File
16-4 Invoking OTT from the Command Line
16-5 Contents of a User-Created Intype File
16-6 Object Type Definition for Employee
16-7 OTT-Generated Struct Declarations
16-8 Object Type Definitions for the OTT Type Mapping Example
16-9 Various Type Mappings Created by OTT from Object Type Definitions
16-10 Object Type and Subtype Definitions
16-11 Contents of the Intype File
16-12 OTT Generates C Structs for the Types and Null Indicator Structs
16-13 Contents of an Intype File
16-14 Contents of the Outtype File After Running OTT
16-15 Content of an Intype File Named ex2c.typ
16-16 Invoking OTT and Specifying the Initialization Function
16-17 Content of an OTT-Generated File Named ex2cv.c
16-18 Object Type Definition to Demonstrate How OTT Generates Include Files
16-19 Content of the Intype File
16-20 Invoking OTT from the Command Line
16-21 Content of the Header File tott95b.h
16-22 Content of the Header File tott95a.h
16-23 Construct to Use to Conditionally Include the Header File tott95b.h
18-1 Creating a Compound Sharding Key
18-2 Custom Pool Example
F-1 Setting Configuration Parameters and Starting agtctl
Scripting on this page enhances content navigation, but does not change the content in any way.