Sets a numeric 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.
Ora8.bdh
Ora8AttrSetNumber( in hTargetHandle : number, in nType : number, in nAttrValue : number, in nAttrType : number ): boolean;
true if successful
false otherwise
Parameter | Description |
---|---|
hTargetHandle | Initialized handle whose attribute gets modified. |
nType |
Specifies the type of the handle whose attribute gets modified. The specific types are:
|
nAttrValue | Numeric value that should be set as attribute value into the target handle. |
nAttrType |
The type of attribute being set. The valid types are listed in the table "ORA 8 attributes". |
var ghEnv0 : number; ghError0 : number; ghServer0 : number; ghStmt0 : number; ghSvcCtx0 : number; ghSession0 : number; dcltrans transaction TMain begin Ora8Init(ghEnv0); Ora8HandleAlloc(ghEnv0, ghServer0, OCI_HTYPE_SERVER); Ora8HandleAlloc(ghEnv0, ghSvcCtx0, OCI_HTYPE_SVCCTX); Ora8HandleAlloc(ghEnv0, ghError0, OCI_HTYPE_ERROR); Ora8ServerAttach(ghServer0, "ORCLNET2"); Ora8AttrSetHandle(ghSvcCtx0, OCI_HTYPE_SVCCTX, ghServer0, OCI_ATTR_SERVER); Ora8HandleAlloc(ghEnv0, ghSession0, OCI_HTYPE_SESSION); Ora8AttrSetString(ghSession0, OCI_HTYPE_SESSION, "SCOTT", OCI_ATTR_USERNAME); Ora8AttrSetString(ghSession0, OCI_HTYPE_SESSION, "TIGER", OCI_ATTR_PASSWORD); Ora8SessionBegin(ghSvcCtx0, ghSession0, OCI_CRED_RDBMS); Ora8AttrSetHandle(ghSvcCtx0, OCI_HTYPE_SVCCTX, ghSession0, OCI_ATTR_SESSION); Ora8HandleAlloc(ghEnv0, ghStmt0, OCI_HTYPE_STMT); Ora8AttrSetNumber(ghStmt0, OCI_HTYPE_STMT, 10, OCI_ATTR_PREFETCH_ROWS); ... Ora8HandleFree(ghStmt0, OCI_HTYPE_STMT); Ora8SessionEnd(ghSvcCtx0, ghSession0); Ora8HandleFree(ghSession0, OCI_HTYPE_SESSION); Ora8ServerDetach(ghServer0); Ora8HandleFree(ghServer0, OCI_HTYPE_SERVER); Ora8HandleFree(ghSvcCtx0, OCI_HTYPE_SVCCTX); Ora8HandleFree(ghError0, OCI_HTYPE_ERROR); Ora8HandleFree(ghEnv0, OCI_HTYPE_ENV); end TMain;