Ora8TransStart Function

Action

Sets the beginning of a transaction.

Include file

Ora8.bdh

Syntax

Ora8TransStart( in hSvcCtx  : number,
                in nTimeout : number optional,
                in nOptions : number optional ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hSvcCtx The service context handle.
nTimeout The time, in seconds, to wait for a transaction to become available for resumption when OCI_TRANS_RESUME is specified (optional). When OCI_TRANS_NEW is specified, the timeout parameter indicates the number of seconds the transaction can bee inactive before it is automatically aborted by the system.
nOptions

Flags (optional).

Valid options are:

  • OCI_TRANS_NEW

  • OCI_TRANS_TIGHT

  • OCI_TRANS_LOOSE

  • OCI_TRANS_RESUME

  • OCI_TRANS_READONLY

  • OCI_TRANS_SERIALIZABLE

  • OCI_TRANS_SEPARABLE

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");
         
    Ora8TransStart(ghSvcCtx0, 60, OCI_TRANS_NEW);
    ...
    Ora8TransDetach(ghSvcCtx0);

    Ora8HandleFree(ghStmt0, OCI_HTYPE_STMT);
    Ora8Logoff(ghSvcCtx0);
    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: OCITransStart