Ora8AttrGetNumber Function

Action

Gets a number attribute of a handle or a descriptor. The type of the target handle whose attribute gets modified must be specified in the nType parameter. The attribute type must be specified in the nAttrType parameter.

Include file

Ora8.bdh

Syntax

Ora8AttrGetNumber( in  hTargetHandle : number,
                   in  nType         : number,
                   out nAttrValue    : number,
                   in  nAttrType     : number ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hTargetHandle Initialized handle whose attribute is retrieved.
nType

Specifies the type of the handle whose attribute is retrieved.

The specific types are:

  • OCI_HTYPE_ENV

  • OCI_HTYPE_ERROR

  • OCI_HTYPE_SVCCTX

  • OCI_HTYPE_STMT

  • OCI_HTYPE_BIND

  • OCI_HTYPE_DEFINE

  • OCI_HTYPE_DESCRIBE

  • OCI_HTYPE_SERVER

  • OCI_HTYPE_SESSION

  • OCI_HTYPE_TRANS

nAttrValue Variable receiving the number attribute value.
nAttrType

The type of attribute being retrieved.

The valid types are listed in the table "ORA 8 attributes".

Example

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

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

    Ora8AttrGetNumber(ghSvcCtx0, OCI_HTYPE_SVCCTX, nCacheMaxSize, OCI_ATTR_CACHE_MAX_SIZE);

    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: OCIAttrGet