Ora8ParamGet Function

Action

Returns a descriptor of a parameter specified by position in the describe handle or statement handle.

Include file

Ora8.bdh

Syntax

Ora8ParamGet( in  hHandle     : number
              in  nType       : number,
              out hParamDesc  : number,
              in  nPosition   : number) : boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hHandle A statement handle or describe handle.
nType

Specifies the type of the handle.

Valid types are:

  • OCI_HTYPE_STMT

  • OCI_DTYPE_PARAM

  • OCI_HTYPE_COMPLEXOBJECT

hParamDesc Variable receiving the descriptor of the parameter at the given position, of handle type OCI_DTYPE_PARAM.
nPosition Position number in the statement handle or describe handle.

Example

var
  ghEnv0        : number;
  ghError0      : number;
  ghStmt0       : 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");

    Ora8HandleAlloc(ghEnv0, ghStmt0, OCI_HTYPE_STMT);
    Ora8StmtPrepare(ghStmt0, sqlSelect, OCI_NTV_SYNTAX);
    Ora8StmtExecute(ghSvcCtx0, ghStmt0);

    Ora8ParamGet(ghStmt0, OCI_HTYPE_STMT, ghDescriptor0, 1);

    ...

    Ora8HandleFree(ghStmt0, OCI_HTYPE_STMT);
    Ora8Logoff(ghSvcCtx0);
    Ora8HandleFree(ghError0, OCI_HTYPE_ERROR);
    Ora8HandleFree(ghEnv0, OCI_HTYPE_ENV);
  end TMain;

dclsql
  sqlSelect:
    SELECT empno FROM emp;

See also

Oracle's Programmer's Guide to Oracle Call Interface for Wrapped Oracle function: OCIParamGet