Skip Headers

Oracle Call Interface Programmer's Guide
Release 2 (9.2)

Part Number A96584-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to next page


Preface

The Oracle Call Interface (OCI) is an application programming interface (API) that allows applications written in C or C++ to interact with one or more Oracle database servers. 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:

Audience

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 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.

See Also:

Organization

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:

PART I: OCI CONCEPTS

Part I (Chapter 1 through Chapter 9) provides conceptual information about how to program with OCI to build scalable application solutions that provide access to relational data in an Oracle database.

Chapter 1, "Introduction and Upgrading"

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.

Chapter 2, "OCI Programming Basics"

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

Chapter 3, "Datatypes"

Understanding how data is converted between Oracle tables and variables in your host program is essential for using OCI. This chapter discusses Oracle internal and external datatypes, and data conversions.

Chapter 4, "Using SQL Statements in OCI"

This chapter discusses the steps involved in SQL statements using OCI.

Chapter 5, "Binding and Defining"

This chapter discusses OCI bind and define operations in detail, including a discussion of advanced bind and define operations.

Chapter 6, "Describing Schema Metadata"

This chapter discusses how to use the OCIDescribeAny() call to obtain information about schema objects and their associated elements.

Chapter 7, "LOB and FILE Operations"

This chapter describes OCI support for LOB, FILE, and temporary LOB datatypes.

Chapter 8, "Managing Scalable Platforms"

This chapter describes password management, session management, and thread safety.

Chapter 9, "OCI Programming Advanced Topics"

This chapter covers more advanced OCI programming topics, including the OCI thread support, descriptions of user callbacks, application failover callbacks, advanced queuing, and publish-subscribe notification.

PART II: OCI OBJECT CONCEPTS

Part II (Chapter 10 through Chapter 14) describes OCI functionality for accessing object-relational data with OCI.

Chapter 10, "OCI Object-Relational Programming"

This chapter provides an introduction to the concepts involved when using OCI to access objects in an Oracle database server. The chapter includes a discussion of basic object concepts and object navigational access, and the basic structure of object-relational applications.

Chapter 11, "Object-Relational Datatypes"

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.

Chapter 12, "Direct Path Loading"

Discusses loading of data (scalars, objects) from files into scalar and object columns using the Direct Path Loading API.

Chapter 13, "Object Cache Navigation"

This chapter provides an introduction to the concepts involved when using OCI to access objects in an Oracle database server. This chapter also discusses the Object Cache, and the use of OCI navigational calls to manipulate objects retrieved from the server.

Chapter 14, "The Object Type Translator (OTT)"

This chapter discusses the use of the Object Type Translator to convert database object definitions to C structure representations for use in OCI applications.

PART III: OCI REFERENCE

Part III (Chapter 15 through Chapter 20) lists OCI function calls in the OCI library.

Chapter 15, "OCI Relational Functions"

This chapter contains a list of OCI relational functions, including syntax, comments, parameter descriptions, and other useful information.

Chapter 16, "More OCI Relational Functions"

Continues the OCI relational functions started in the last chapter. It covers statement functions, as well as LOB, threads, transaction management and miscellaneous functions.

Chapter 17, "OCI Navigational and Type Functions"

This chapter contains a list of OCI navigational functions, including syntax, comments, parameter descriptions, and other useful information.

Chapter 18, "OCI Datatype Mapping and Manipulation Functions"

This chapter contains a list of OCI datatype mapping and manipulation functions, including syntax, comments, parameter descriptions, and other useful information.

Chapter 19, "OCI Cartridge Functions"

This chapter discusses special OCI functions used by external procedures and cartridge functions.

Chapter 20, "OCI Any Type and Data Functions"

This chapter describes the OCI Any Type and Data functions.

PART IV: APPENDIXES

Part IV (Appendix A through Appendix C) provides additional reference information about OCI programming.

Appendix A, "Handle and Descriptor Attributes"

This appendix describes the attributes of OCI application handles that can be set or read using OCI calls.

Appendix B, "OCI Demonstration Programs"

This appendix gives the names of important OCI demonstration programs that are included with the Oracle installation.

Appendix C, "OCI Function Server Round-trips"

This appendix includes tables which show the estimated number of server round-trips required by various OCI applications.

Where to Begin

Because of the many enhancements to OCI, both new and experienced users should read the conceptual material in Part I.

Readers familiar with the current version of OCI and interested in its object capabilities may want to skim Part 1 and then begin reading the chapters in Part II.

Readers looking for reference information, such as OCI function syntax and handle attribute descriptions, should refer to Part III and Part IV.

Related Documentation

In North America, printed documentation is available for sale in the Oracle Store at

http://oraclestore.oracle.com/

Customers in Europe, the Middle East, and Africa (EMEA) can purchase documentation from

http://www.oraclebookshop.com/

Other customers can contact their Oracle representative to purchase printed documentation.

To download free release notes, installation documentation, white papers, or other collateral, please visit the Oracle Technology Network (OTN). You must register online before using OTN; registration is free and can be done at

http://otn.oracle.com/admin/account/membership.html

If you already have a username and password for OTN, then you can go directly to the documentation section of the OTN Web site at

http://otn.oracle.com/docs/index.htm

To access the database documentation search engine directly, please visit

http://tahiti.oracle.com

The Oracle Call Interface Programmer's Guide does not contain all information that describes the features and functionality of OCI in the Standard Edition and the Enterprise Edition products.

Oracle C++ Call Interface

For C++ programmers, the Oracle C++ Call Interface provides OCI functionality for C++ programs and lets you manipulate database objects (of user-defined types) as C++ objects.

Other Sources of Information about OCI

For other sources of information about OCI:

See Also:

Conventions

The following notational and text formatting conventions are used in this guide:

...

In code fragments, an ellipsis means that code not relevant to the discussion has been omitted. In syntax, an ellipsis means that the previous item can be repeated.

monospace font

SQL and C code examples, OCI function names, database objects, packages, usernames, file names, and directory names are shown in monospace font. Syntax examples are in monospace font also.

italics

Italics are also used for emphasis and for the titles of documents.

monospace italic

Monospace italics are used for OCI parameters, and user-supplied data fields, when used in body text. Plain font is used for these items when used in tables and in lists.

MONOSPACE UPPERCASE

Monospace uppercase is used for SQL or PL/SQL keywords, such as SELECT or UPDATE.

See Also:

Oracle9i SQL Reference and the PL/SQL User's Guide and Reference to see the lists of the keywords and reserved words for SQL and PL/SQL

bold

Boldface type is used to identify the names of C datatypes, such as ub4, sword, or OCINumber. Bold is sometimes used in code examples for emphasis.

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 releases 8 and later OCI than in the 7.x OCIs.



Caution:

An item marked Caution 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.

Documentation Accessibility

Our goal is to make Oracle products, services, and supporting documentation accessible, with good usability, to the disabled community. To that end, our documentation includes features that make information available to users of assistive technology. This documentation is available in HTML format, and contains markup to facilitate access by the disabled community. Standards will continue to evolve over time, and Oracle Corporation is actively engaged with other market-leading technology vendors to address technical obstacles so that our documentation can be accessible to all of our customers. For additional information, visit the Oracle Accessibility Program Web site at

http://www.oracle.com/accessibility/
Accessibility of Code Examples in Documentation

JAWS, a Windows screen reader, may not always correctly read the code examples in this document. The conventions for writing code require that closing braces should appear on an otherwise empty line; however, JAWS may not always read a line of text that consists solely of a bracket or brace.

Accessibility of Links to External Web Sites in Documentation

This documentation may contain links to Web sites of other companies or organizations that Oracle Corporation does not own or control. Oracle Corporation neither evaluates nor makes any representations regarding the accessibility of these Web sites.


Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback