Allocates and initializes a handle of the specified type.
Ora8.bdh
Ora8HandleAlloc( in hEnv : number, out hHandle : number, in nType : number): boolean;
true if successful
false otherwise
Parameter | Description |
---|---|
hEnv | An initialized environment handle. This is used as parent handle. |
hHandle | Variable receiving the handle to be allocated. |
nType |
Specifies the type of handle to be allocated. The allowed types are:
|
var ghEnv0 : number; ghError0 : number; ghStmt0 : number; ghSvcCtx0 : number; dcltrans transaction TMain const PUBLIC_KEY := "\h59b20094..."; begin Ora8Init(ghEnv0, OCI_DEFAULT); Ora8HandleAlloc(ghEnv0, ghError0, OCI_HTYPE_ERROR); Ora8Logon(ghEnv0, ghSvcCtx0, "user", "password", "orclnet2"); Ora8HandleAlloc(ghEnv0, ghStmt0, OCI_HTYPE_STMT); Ora8StmtPrepare(ghStmt0, sqlInsert, OCI_NTV_SYNTAX); Ora8Bind(ghStmt0, ":name", SQLT_CHR, 32); Ora8Bind(ghStmt0, ":key", SQLT_BIN, 64); Ora8SetString(ghStmt0, ":name", "Michael"); Ora8SetBinary(ghStmt0, ":key", PUBLIC_KEY, STRING_COMPLETE); Ora8StmtExecute(ghSvcCtx0, ghStmt0); Ora8HandleFree(ghStmt0, OCI_HTYPE_STMT); Ora8Logoff(ghSvcCtx0); Ora8HandleFree(ghError0, OCI_HTYPE_ERROR); Ora8HandleFree(ghEnv0, OCI_HTYPE_ENV); end TMain; dclsql sqlInsert: INSERT INTO keys (name, key) VALUES (:name, :key);