Ora8ServerDetach Function

Action

Deletes an access path to a data source for OCI operations.

Include file

Ora8.bdh

Syntax

Ora8ServerDetach( in hServer : number,
                  in nMode   : number optional ) : boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hServer An initialized server handle, which gets reset to uninitialized state. The handle is not de-allocated.
nMode

Specifies the various modes of operation (optional).

The only valid mode is OCI_DEFAULT for the default mode.

Omit the parameter in order to use the default parameter.

Example

var
  ghEnv0        : number;
  ghError0      : number;
  ghServer0     : number;

dcltrans
  transaction TMain
  begin
    Ora8Init(ghEnv0);
    Ora8HandleAlloc(ghEnv0, ghError0, OCI_HTYPE_ERROR);
    Ora8HandleAlloc(ghEnv0, ghServer0, OCI_HTYPE_SERVER);
    Ora8ServerAttach(ghServer0, "ORCLNET2");

    ...

    Ora8ServerDetach(ghServer0);
    Ora8HandleFree(ghServer0, OCI_HTYPE_SERVER);
    Ora8HandleFree(ghError0, OCI_HTYPE_ERROR);
    Ora8HandleFree(ghEnv0, OCI_HTYPE_ENV);
  end TMain;

See Also

Oracle's Programmer's Guide to Oracle Call Interface for Wrapped Oracle function: OCIServerDetach