Skip Headers

Oracle Call Interface Getting Started
Release 9.2 for Windows

Part Number A95497-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

1
Introduction to Oracle Call Interface

This chapter provides introductory information to help you get started with Oracle Call Interface (OCI) for Windows.

This chapter contains these topics:

What is the Oracle Call Interface?

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. OCI gives your programs the capability to perform the full range of database operations that are possible with Oracle9i database, including SQL statement processing and object manipulation.

What is Included in the OCI Package?

The Oracle Call Interface for Windows package includes:

The OCI for Windows package includes the additional libraries required for linking your OCI programs on Windows NT, Windows 2000, and Windows 98.

Oracle Directory Structure

When you install the Oracle Call Interface for Windows, Oracle Universal Installer creates an ORACLE_BASE\ORACLE_HOME directory on the hard drive of your computer. The default Oracle home directory is C:\oracle\ora92.

The OCI files are located in the ORACLE_BASE\ORACLE_HOME directory, as are the library files needed to link and run OCI applications, and link with other Oracle for Windows NT products, such as Oracle Forms.

The ORACLE_BASE\ORACLE_HOME directory contains the following directories that are relevant to OCI:

Table 1-1 Oracle_Home Directories and contents  
Directory Name Contents

\bin

Executable and help files

\oci

Oracle Call Interface directory for Windows files

\oci\include

Header files, such as oci.h and ociap.h

\oci\samples

Sample programs

\precomp\admin\ottcfg.cfg

Object Type Translator utility and default configuration file

Sample Programs

When OCI is installed, a set of sample programs and their corresponding project files are copied to the ORACLE_BASE\ORACLE_HOME\oci\samples subdirectory. Oracle Corporation recommends that you build and run these sample programs to verify that OCI has been successfully installed and to familiarize yourself with the steps involved in developing OCI applications.

To build a sample, run a batch file(make.bat)at the command prompt. For example, to build the cdemo1.c sample, enter the following command:

C:> make cdemo1

After you finish using these sample programs, you can delete them if you choose.

A sample OCI application specific to Windows platforms is included. cdemomt.c demonstrates OCI multithreading which is the thread safety feature of Oracle9i is also included on the Windows platforms. This sample program requires the emp table from the default database. The program spawns two simultaneous threads that attempt to insert different employee names with the same ID numbers. Thread synchronization is demonstrated.

ociucb.c should be compiled using ociucb.bat. This batch file creates a DLL and places it in the ORACLE_BASE\ORACLE_HOME\bin directory. To load user callback functions, set the environment/registry variable ORA_OCI_UCBPKG = OCIUCB.

See Also:

Oracle Call Interface Programmer's Guide for more information on multithreading


Go to previous page Go to next page
Oracle
Copyright © 1995, 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