Oracle® Call Interface Programmer's Guide, 10g Release 2 (10.2) Part Number B14250-02 |
|
|
View PDF |
Oracle provides code examples illustrating the use of OCI calls. These programs are provided for demonstration purposes, and are not guaranteed to run on all operating systems.
The demonstration programs are available with your Oracle installation. The location, names, and availability of the programs may vary on different operating systems. On a UNIX workstation, the programs are installed in the $ORACLE_HOME/rdbms/demo
directory.
OCI header files that are required for OCI client application development on UNIX platforms are in the $ORACLE_HOME/rdbms/public
directory. The demo_rdbms.mk
file is in the $ORACLE_HOME/rdbms/demo
directory and serves as an example makefile, starting with the 10.2 release. On Windows systems, make.bat
is the analogous file in the samples directory.
Unless you significantly modify the demo_rdbms.mk
file, you are not affected. This is because the demo_rdbms.mk
file already includes the $ORACLE_HOME/rdbms/public
directory. Ensure that your highly customized makefiles have the $ORACLE_HOME/rdbms/public
directory in the INCLUDE
path.
Development of new makefiles to build an OCI application or an external procedure should consist of the customizing of the makefile provided by adding your own macros to the link line. However, Oracle requires that you keep the macros provided in the demo makefile, as it will result in easier maintenance of your own makefiles.
When a specific header or SQL file is required by the application, these files are also included. Review the information in the comments at the beginning of the demonstration programs for setups and hints on running the programs.
Table B-1 lists the important demonstration programs and the OCI features that they illustrate.
Table B-1 OCI Demonstration Programs
Program Name | Features Illustrated |
---|---|
|
Using basic SQL processing with release 8 functionality. |
|
Performing basic processing of user-defined objects. |
|
Using complex object retrieval (COR) to improve performance. |
|
Using |
|
Describing information about a table. |
|
Describing information about an object type. |
|
Registering and operating application failover callbacks. |
|
Create and insert LOB data and then read, write, copy, append and trim the data. |
|
Writing and reading of |
|
Writing and reading to LOBs with the LOB buffering system. |
|
Pinning and navigation of |
|
Insert and select of nested table and varray. |
|
Using |
|
Using session switching and migration. |
|
Using the OCIThread package. |
|
Registering predefined subscriptions and specifying a callback function to be invoked for client notifications (for more information about Advanced Queuing, see Oracle Streams Advanced Queuing User's Guide and Reference). |
|
Streams Advanced Queuing. Enqueues 100 messages. Dequeues messages by blocking. Listens for multiple agents. Array enqueue of 10 messages. Array dequeue of 10 messages. |
|
Loading data with the direct path load functions. |
|
Loading a column object with the direct path load functions. Loading a nested column object with the direct path load functions. Loading derived type (inheritance) - direct path. Loading an object table with inheritance - direct path. Loading a reference with the direct path load functions. Loading SQL strings with the direct path load functions. |
|
Using static and dynamic user callbacks. |
|
Using dynamic user callbacks with multiple packages. |
|
Datetime and interval example. Demonstrates IN and OUT binds with PL/SQL procedure or function. |
|
Scrollable cursor. |
|
Accesses LOBs using the |
|
Inheritance demo which modifies an inherited type in a table and displays a record from the table. |
|
Inheritance demo to do attribute substitutability. |
|
Inheritance demo that describes an object, inherited types, object tables, and a sub-table. |
|
Anydata demo. Inserts and selects rows to and from anydata table. |
|
Anydata demo. Creates a type piecewise using |
|
Session pooling. |
|
Connection pooling. |
|
Connection pooling with proxy functionality. |
|
Statement caching. |
|
Program for OCI UTF16 API. |
|
Shows nchar implicit conversion feature and codepoint feature. |