Ora8DescriptorAlloc Function

Action

Allocates and initializes a descriptor or LOB locator of the specified type.

Include file

Ora8.bdh

Syntax

Ora8DescriptorAlloc( in  hEnv        : number,
                     out hDescriptor : number,
                     in  nType       : number): boolean;

Return value

  • true if successful

  • false otherwise.

Parameter Description
hEnv An initialized environment handle. This is used as parent handle.
hDescriptor Variable receiving the descriptor or LOB locator to be allocated.
nType

Type of descriptor or LOB locator to be allocated.

Could be one of the following:

  • OCI_DTYPE_SNAP

  • OCI_DTYPE_LOB

  • OCI_DTYPE_FILE

  • OCI_DTYPE_ROWID

Example

var
  ghEnv0        : number;
  ghError0      : number;
  ghSvcCtx0     : number;
  ghDescriptor0 : number;

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

    Ora8DescriptorAlloc(ghEnv0, ghDescriptor0, OCI_DTYPE_SNAP);

    ...

    Ora8DescriptorFree(ghDescriptor0, OCI_DTYPE_SNAP);
    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 functions: OCIDescriptorAlloc