Share this page

# lrd_bind_cols

Binds a host variable array to columns.

    LRDRET lrd_bind_cols( LRD_CURSOR *mptCursor, LRD_BIND_COL_INFO *mptBindColInfo, int miDBErrorSeverity);

mptCursor | A pointer to an LRD_CURSOR structure.
mptBindColInfo | A pointer to a pre-initialized array containing column binding information.
miDBErrorSeverity | The Error Severity Levels of a failure in a database routine.

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".

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

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, a SELECT statement retrieves all of the database records from the emp table. a value of 1000 or greater in their SAL column. lrd_exec executes the statement and lrd_bind_cols binds all of the columns to host variables.

    lrd_stmt(Csr1, "select * from emp", -1, 1, 1, 0);

    lrd_bind_cols(Csr1, BCInfo_D26, 0);

    lr_think_time(214);

    lrd_exec(Csr1, 0, 0, 0, 0, 0);

    lrd_fetch(Csr1, -14, 14, 0, PrintRow12, 0);

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