Share this page

# lrd_ora8_bind_col

Binds a host variable to a column.

    LRDRET lrd_ora8_bind_col( void *mpvLRDDBIHandleStmt, void **mppvLRDDBIHandleDefine, int muiColNum, LRD_VAR_DESC *mptVarDesc, long mliMode, int miDBErrorSeverity );

mpvLRDDBIHandleStmt | A non-NULL pointer to an LRDDBI Stmt Handle.
mppvLRDDBIHandleDefine | A pointer to a pointer to the address of the LRDDBI Define Handle.
muiColNum | The column number in the result set.
mptVarDesc | A pointer to the descriptor of a variable to bind.
mliMode | The database mode.
miDBErrorSeverity | The Error Severity Levels of a failure in a database routine.

The lrd_ora8_bind_col function binds a host variable to an output column. VuGen generates an lrd_ora8_bind_col statement for all columns in the result set.

A host variable is automatically generated by VuGen. It has the following structure:

<column name>_D<data index>

For example, &ENAME_D3 represents the third set of data whose column name is "ENAME".

For more details refer to the Function Header File lrd.h in the include directory.

## Return Values

See LRD Return Values.

## Parameterization

You cannot use standard parameterization for any arguments in this function.

## Example

In the following example, lrd_ora8_exec executes an SQL statement and lrd_ora8_bind_col binds the host variables to their respective columns.

    lrd_ora8_stmt(OraStm3, "select * from user_objects\n", 1, 0, 0);
    lrd_ora8_exec(OraSvc1, OraStm3, 0, 0, &uliRowsProcessed, 0, 0, 0, 0, 0);
    lrd_attr_set_ora(OraDef2, CHARSET_FORM, "1", -1, 0);
    lrd_attr_set_ora(OraDef3, CHARSET_FORM, "1", -1, 0);
    lrd_attr_set_ora(OraDef6, CHARSET_FORM, "1", -1, 0);
    lrd_ora8_bind_col(OraStm3, &OraDef2, 1, &OBJECT_NAME_D17, 0, 0);
    lrd_ora8_bind_col(OraStm3, &OraDef3, 2, &SUBOBJECT_NAME_D18, 0, 0);
    lrd_ora8_bind_col(OraStm3, &OraDef4, 3, &OBJECT_ID_D19, 0, 0);
    lrd_ora8_bind_col(OraStm3, &OraDef5, 4, &DATA_OBJECT_ID_D20, 0, 0);
    lrd_ora8_bind_col(OraStm3, &OraDef6, 5, &OBJECT_TYPE_D21, 0, 0);
    lrd_ora8_bind_col(OraStm3, &OraDef7, 6, &CREATED_D22, 0, 0);
    lrd_ora8_fetch(OraStm3, -75, 15, &uliFetchedRows, PrintRow11, 2, 0, 0);

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: