Ora8Init Function

Action

Initializes the OCI environment and allocates a handle to the initialized environment.

Include file

Ora8.bdh

Syntax

Ora8Init (out hEnv  : number,
          in  nMode : number optional ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hEnv Variable receiving the handle to the initialized environment.
nMode

Specifies initialization of an environment mode (optional).

Valid modes are:

  • OCI_DEFAULT (default)

  • OCI_THREADED

  • OCI_OBJECT

  • OCI_SHARED

  • OCI_EVENTS

  • OCI_NO_MUTEX

  • OCI_NO_UCB

Example

var
  ghEnv0        : number;

 dcltrans
  transaction TMain
  var
    bOK : boolean;
  begin
    bOK := Ora8Init(ghEnv0, OCI_DEFAULT);

    if bOK then
      write("OCI environment successfully initialized."); writeln;
    else
      write("Error initializing OCI environment."); writeln;
    end;

    ...

    Ora8HandleFree(ghEnv0, OCI_HTYPE_ENV);
  end TMain;

Output

OCI environment successfully initialized.

See Also

Oracle's Programmer's Guide to Oracle Call Interface for Wrapped Oracle functions: OCIEnvCreate, OCIEnvNlsCreate, OCIInitialize, OCIEnvInit