Ora8BindRefCur Function

Action

Binds a place holder in a SQL statement or PL/SQL block to a program variable. The variable is accessible through the Ora8Set and Ora8Get functions. The place holder is identified by the name or the number declared in the SQL statement or PL/SQL block. The functions listed below are used to assign values to the program variable that is bound to the specified place holder:

  • Ora8SetString
  • Ora8SetBinary
  • Ora8SetInt
  • Ora8SetFloat
  • Ora8SetNull

This function serves to bind place holders in SQL statements or PL/SQL blocks to both scalar and array variables. In addition, it can be used to bind place holders to be used in piecewise operations. The function must be called after preparing the SQL statement or PL/SQL block and before calling the Ora8Set function.

Include file

Ora8.bdh

Syntax

Ora8BindRefCur( in  hStmt        : number,
                in  sSqlVar      : string,
                in  hStmtRefCur  : number): boolean;

Return value

  • true if successful

  • false otherwise. In this case, you can use the Ora8OciError function to retrieve the Oracle OCI error code

Parameter Description
hStmt Statement handle.
sSqlVar Name of the place holder in the SQL statement or PL/SQL block. This parameter must include the preceding colon identifying it as a place holder.
hStmtRefCur REF CURSOR statement handle.

See also

Oracle's Programmer's Guide to Oracle Call Interface for Wrapped Oracle functions: OCIBindByName, OCIBindByPos