ORACLE OCI - PowerPoint PPT Presentation

1 / 8
About This Presentation
Title:

ORACLE OCI

Description:

Oracle Call Interface for C and C. Basic Program Structure ... Similar to file ids in c. Sample OCI Handles. OCI_HTYPE_BIND. OCI bind handle. OCIBind ... – PowerPoint PPT presentation

Number of Views:662
Avg rating:3.0/5.0
Slides: 9
Provided by: randyl3
Category:
Tags: oci | oracle | program | sample

less

Transcript and Presenter's Notes

Title: ORACLE OCI


1
ORACLE OCI
  • Oracle Call Interface for C and C

2
Basic Program Structure
  • Initialize the OCI programming environment and
    processes.
  • Allocate necessary handles, and establish a
    server connection and a user session.
  • Issue SQL statements to the server, and perform
    necessary application data processing.
  • Free statements and handles not to be reused or
    re-execute prepared statements again, or prepare
    a new statement.
  • Terminate user session and server connection.

3
OCI Data Structures
  • Handles
  • opaque data structures
  • Similar to file ids in c

4
Sample OCI Handles
5
Environment Handle
  • The environment handle defines a context in which
    all OCI functions are invoked. Each environment
    handle contains a memory cache, which allows for
    fast memory management in a threaded environment
    where each thread has its own environment

6
OCIInitialize()
  • Must be called before any other OCI call.
  • Mode Parameter
  • OCI_DEFAULT
  • OCI_THREADED
  • OCI_OBJECT

7
OCIEnvInit()
8
Single-User, Single Connection
  • OCILogon(envhp, errhp, svchp, "scott", nameLen,
    "tiger", passwdLen, "oracle8", dbnameLen)
  • evhp environment handle
  • errhp error handle
Write a Comment
User Comments (0)
About PowerShow.com