Index   Search   Add FAQ   Ask Question  

Oracle Call Interface FAQ

$Date: 22-Apr-2000 $
$Revision: 1.10 $
$Author: Frank Naudé $

Topics

  • What is the Oracle Call Interfaces?
  • Should one use OCI or the Oracle Precompilers?
  • How does one write an OCI program?
  • How does one compile and link an OCI program?
  • Where can I get more info about OCI?

  • Back to Oracle FAQ Index

    What is the Oracle Call Interface?

    The Oracle Call Interface (OCI) is a set of low-level APIs to perform Oracle database operations (eg. logon, execute, parse, fetch records).

    OCI programs are normally written in C or C++, although they can be written in almost any programing language. Unlike with the Oracle Precompilers (like Pro*C), OCI programs are not precompiled.

  • Back to top of file

  • Should one use OCI or the Oracle Precompilers?

    OCI is superior to Pro*C in the following ways: Common problems with OCI: An OCI application program must do the following:

    For more information about Pro*C and other language precompilers, read the Oracle Precompilers FAQ.

  • Back to top of file

  • How does one write an OCI program?

    Look at this very basic sample Oracle OCI8 program:

  • Back to top of file

  • How does one compile and link an OCI program?

    1. Write an OCI program (e.g. myoci.c). You can find examples in the $ORACLE_HOME/rdbms/demo directory.

    2. Copy the make file $ORACLE_HOME/rdbms/demo/demo_rdbms.mk into the directory where your OCI program is. You can also copy some of the sample OCI files (cdemo1.c, etc.) provided by Oracle to compile and link.

    3. Issue the following command make -f demo_rdbms.mk build EXE=cdemo1 OBJS=cdemo1.o

  • Back to top of file

  • Where can I get more info about OCI?

  • Back to top of file

  • General: Home | Index | Preamble | Glossary | OraCorp | Papers | Fun | News | Events | Y2000 | Books | Links | Forums
    Products: SQL | Plus | Loader | PL/SQL | PreComp | OPO | OMO | OO4OLE | DBA | PQO | PSO | OCO | Net | ODBC | WebServer | Des2k | Dev2k
    Systems: MVS | Unix | Windows | WindowsNT | NetWare | VMS