|Oracle Call Interface Programmer's Guide
The Oracle Call Interface (OCI) is an application programming interface (API) that allows applications written in C to interact with one or more Oracle servers. The OCI gives your programs the capability to perform the full range of database operations that are possible with an Oracle database server, including SQL statement processing and object manipulation.
The Preface includes the following sections:
This guide provides a sound basis for developing applications using the OCI. The guide is divided into two volumes.
Volume I contains information about the following topics:
Volume II contains the following information:
The Oracle Call Interface Programmer's Guide is intended for programmers developing new applications or converting existing applications to run in the Oracle environment. This comprehensive treatment of the OCI will also be valuable to systems analysts, project managers, and others interested in the development of database applications.
This guide assumes that you have a working knowledge of application programming using C. Readers should also be familiar with the use of Structured Query Language (SQL) to access information in relational database systems. In addition, some sections of this guide also assume a knowledge of the basic concepts of object-oriented programming.
The Oracle Call Interface Programmer's Guide contains information that describes the features and functionality of the Oracle8i and Oracle8i Enterprise Edition products. Oracle8i and Oracle8i Enterprise Edition have the same basic features. However, several advanced features are included only with the Enterprise Edition, such as the Objects Option.
For information about the differences between Oracle8i and Oracle8i Enterprise Edition and the features and options that are available to you, see Getting to Know Oracle8i.
For information about cartridge services, and using OCI calls to develop cartridges, refer to Oracle8i Data Cartridge Developer's Guide.
The Oracle Call Interface Programmer's Guide provides an introduction to the features of the OCI for both new OCI programmers and those programmers who have previously worked with earlier versions of the OCI.
Part 1 of this guide (Chapter 1 through Chapter 9) provides conceptual information about how to program with the OCI to build scalable application solutions that provide access to relational data in an Oracle database. This part also describes the basics of OCI programming and the foundation for the discussion of object-relational features in Part 2.
Part 2 of this guide (Chapter 10 through Chapter 14) describes OCI functionality for accessing object-relational data with the OCI. The chapters in this part describe how to retrieve and manipulate objects through an Oracle server.
Because of the many enhancements to OCI, both new and experienced users should read the conceptual material in Part 1.
Readers familiar with the current version of the OCI and interested in its object capabilities may want to skim Part 1 and then begin reading the chapters in Part 2.
Readers looking for reference information, such as OCI function syntax and handle attribute descriptions, should refer to Part 3 and Part 4 of Volume II.
The Oracle Call Interface Programmer's Guide contains four parts, split between two volumes. A brief summary of what you will find in each chapter and appendix follows:
This chapter introduces you to the Oracle Call Interface and describes special terms and typographical conventions that are used in describing the interface. This chapter also discusses features new to the current release.
This chapter gives you the basic concepts needed to develop an OCI program. It discusses the essential steps each OCI program must include, and how to retrieve and understand error messages
Understanding how data is converted between Oracle tables and variables in your host program is essential for using the OCI interfaces. This chapter discusses Oracle internal and external datatypes, and data conversions.
This chapter discusses the steps involved in SQL statements using the Oracle OCI.
This chapter discusses OCI bind and define operations in detail, including a discussion of advanced bind and define operations.
This chapter discusses how to use the OCIDescribeAny() call to obtain information about schema objects and their associated elements.
This chapter describes the OCI support for LOB, FILE, and temporary LOB datatypes.
This chapter describes password management, session management, and thread safety.
This chapter covers more sophisticated OCI programming topics, including descriptions of user callbacks, publish-subscribe notification, direct path loading, and other functionality.
This chapter provides an introduction to the concepts involved when using the OCI to access objects in an Oracle database server. The chapter includes a discussion of basic object concepts and object pinning, and the basic structure of object-relational applications.
This chapter outlines the object datatypes used in OCI programming.
This chapter discusses the C mappings of user-defined datatypes in an Oracle database, and the functions that manipulate such data. Binding and defining using these C mappings is also covered.
This chapter provides an introduction to the concepts involved when using the OCI to access objects in an Oracle database server. This chapter also discusses the Object Cache, and the use of the OCI navigational calls to manipulate objects retrieved from the server.
This chapter discusses the use of the Object Type Translator to convert database object definitions to C structure representations for use in OCI applications.
This chapter contains a list of the OCI relational functions, including syntax, comments, parameter descriptions, and other useful information.
This chapter contains a list of the OCI navigational functions, including syntax, comments, parameter descriptions, and other useful information.
This chapter contains a list of the OCI datatype mapping and manipulation functions, including syntax, comments, parameter descriptions, and other useful information.
This chapter discusses special OCI functions used by external procedures.
See Also: For a a discussion of the OCI functions that apply to an NLS environment, see the Oracle8i National Language Support Guide. For a discussion of the OCI functions that apply to cartridge services, see the Oracle8i Data Cartridge Developer's Guide.
This appendix describes the attributes of OCI application handles that can be set or read using OCI calls.
This appendix includes a listing of important OCI demonstration programs that are included with the Oracle installation.
This appendix includes tables which show the number of server roundtrips required by various OCI applications.
The following notational and text formatting conventions are used in this guide:
Square brackets indicate that the enclosed item is optional. Do not type the brackets.
Braces enclose items of which only one is required.
A vertical bar separates items within braces, and may also be used to indicate that multiple values are passed to a function parameter.
In code fragments, an ellipsis means that code not relevant to the discussion has been omitted.
SQL or C code examples are shown in monospaced font.
Italics are used for OCI parameters, OCI routines names, file names, and data fields.
Uppercase is used for SQL or PL/SQL keywords, like SELECT or UPDATE. To view the lists of the Oracle keywords or reserved words for SQL and PL/SQL, see the Oracle8i SQL Reference and the PL/SQL User's Guide and Reference.
Boldface type is used to identify the names of C datatypes, like ub4, sword, or OCINumber.
This guide uses special text formatting to draw the reader's attention to some information. A paragraph that is indented and begins with a bold text label may have special meaning. The following paragraphs describe the different types of information that are flagged this way.
Note: The Note flag indicates that the reader should pay particular attention to the information to avoid a common problem or increase understanding of a concept.
7.x Upgrade Note: An item marked with "7.x Upgrade Note" typically alerts the programmer to something that is done much differently in the release 8 OCI than in the 7.x OCIs.
Warning: An item marked as Warning indicates something that an OCI programmer must be careful to do or not do in order for an application to work correctly.
See Also: Text marked See Also points you to another section of this guide, or to other documentation, for additional information about the topic being discussed.
We value and appreciate your comments as an Oracle user and reader of our manuals. As we write, revise, and evaluate our documentation, your opinions are the most important feedback we receive.
You can send comments and suggestions about this manual to the Information Development department at the following e-mail address:
If you prefer, you can send letters or faxes containing your comments to the following address:
Oracle Server Documentation Manager
500 Oracle Parkway
Redwood Shores, CA 94065
Fax: (650) 506-7228