Ora8SvcCtxToLda Function

Action

Converts a V8 or later service context handle into a V7 connection.

Include file

Ora8.bdh

Syntax

Ora8SvcCtxToLda( in  hV8SvcCtx     : number,
                 out hV7Connection : number) : boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hV8SvcCtx An initialized V8 or later service context handle.
hV7Connection Variable receiving the handle to the V7 database connection.

Example

var
  ghEnv0        : number;
  ghError0      : number;
  ghStmt0       : number;
  ghSvcCtx0     : number;
  ghConnect0    : number;
  cCursor       : cursor;

dcltrans
  transaction TMain
  begin
    Ora8Init(ghEnv0, OCI_DEFAULT);
    Ora8HandleAlloc(ghEnv0, ghError0, OCI_HTYPE_ERROR);
    Ora8Logon(ghEnv0, ghSvcCtx0, "user", "password", "orclnet2");

    Ora8SvcCtxToLda(ghSvcCtx0, ghConnect0);

    OraOpen(cCursor, ghConnect0);
    OraParse(cCursor, sqlDelete, ORA_NONDEFERRED);
    OraExec(cCursor);
    OraClose(cCursor);

    Ora8LdaToSvcCtx(ghSvcCtx0, ghConnect0);

    Ora8Logoff(ghSvcCtx0);
    Ora8HandleFree(ghError0, OCI_HTYPE_ERROR);
    Ora8HandleFree(ghEnv0, OCI_HTYPE_ENV);
  end TMain;

dclsql
  sqlDelete:
    DELETE FROM persons;

See also

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