Ora8StmtRelease Function

Action

Releases the statement handle obtained by a call to Ora8StmtPrepare3.

Include file

Ora8.bdh

Syntax

Ora8StmtRelease( inout hHandle : number,
                 in   sKey     : string optional,
                 in   nMode    : number optional ) : boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hHandle The statement handle returned by Ora8StmtPrepare3.
sKey For statement caching only. The key to the returned statement in the cache. This can be used for future calls to Ora8StmtPrepare3 or can be a new key. If a null key is passed in, the statement will not be tagged.
nMode

Specifies various modes of operation (optional).

The possible values are:

  • OCI_DEFAULT (default)
  • OCI_STMTCACHE_DELETE: Only valid for statement caching. The statement will not be kept in the cache any more.

Example

var
  ghEnv0        : number;
  ghError0      : number;
  ghStmt0       : number;
  ghSvcCtx0     : number;

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

    Ora8StmtPrepare3(ghSvcCtx0, ghStmt0, sqlDelete);
    Ora8StmtExecute(ghSvcCtx0, ghStmt0);

    Ora8StmtRelease(ghStmt0);
    
    Ora8Logoff(ghSvcCtx0);
    Ora8HandleFree(ghError0, OCI_HTYPE_ERROR);
    Ora8HandleFree(ghEnv0, OCI_HTYPE_ENV);
  end TMain;
  
dclsql
  sqlDelete:
    DELETE FROM persons;

See also

Oracle Call Interface Programmer's Guide for wrapped Oracle function OCIStmtRelease.