Ora8LdaToSvcCtx Function

Action

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

This function should be used only for resetting a V7 connection obtained from Ora8SvcCtxToLda back to a V8 or later service context handle.

Include file

Ora8.bdh

Syntax

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

Return value

  • true if successful

  • false otherwise.

Parameter Description
hV8SvcCtx Variable receiving the V8 or later service context handle.
hV7Connection The V7 connection returned by Ora8SvcCtxToLda from this service context.

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 functions: OCILdaToSvcCtx