Oracle® Call Interface Programmer's Guide 10g Release 1 (10.1) Part Number B10779-01 |
|
|
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.
The $ORACLE_HOME/rdbms/demo
directory contains not only demos but the file named Makefile
that must be used as a template on how to build your own OCI applications or external procedures. 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
. On Windows systems, make.bat
is the analogous file in the samples directory.
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, "OCI Demonstration Programs" lists the important demonstration programs and the OCI features that they illustrate.
Program Name | Features Illustrated |
---|---|
cdemo81.c |
Using basic SQL processing with release 8 and later 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. |
cdemolb.c |
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 |
|
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). |
ociaqdemo00.c, ociaqdemo01.c, ociaqdemo02.c |
Advanced queuing. |
|
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. |
|
Scrollable cursor. |
|
Accesses LOBs using the LONG API. |
|
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 |
cdemosp.c |
Session pooling. |
cdemocp.c |
Connection pooling. |
cdemocpproxy.c |
Connection pooling with proxy functionality. |
cdemostc.c |
Statement caching. |
cdemouni.c |
Program for OCI UTF16 API. |
nchdemo1.c |
Shows nchar implicit conversion feature and codepoint feature. |