Share this page

# lrd_result_set_ext

Prepares a result set and returns a CtLib return code and type.

    LRDRET lrd_result_set_ext( LRD_CURSOR *mptCursor, long mliOpt1, long mliOpt2, long *mpliReturnCode, long *mpliResultType, int miDBErrorSeverity );

mptCursor | A pointer to an LRD_CURSOR structure.
mliOpt1 | One of the Result Set options,Option 1 LRD_CTLIB_RETCODE_xxx
mliOpt2 | One of the Result Set options, Option 2 LRD_RESULT_SET_CTLIB_OPT2_xxx
mpliReturnCode | The return-code from ct_results at replay time. Typically it should match mliOpt1.
mpliResultType | The result-type from ct_results at replay time. Typically it should match mliOpt2.
miDBErrorSeverity | The Error Severity Levels of a failure in a database routine.

The lrd_result_set_ext function prepares the next result set for printing a character string (usually an SQL statement) with a cursor. It issues a ct_result for the current database statement.

This function is similar to lrd_result_set, except that for CtLib, it returns a CtLib return-code and result type.

By default, VuGen generates the lrd_result_set function when preparing a result set. To instruct VuGen to generate the extended result set function, lrd_result_set_ext, perform the following steps:

Choose Tools > Recording Options.

Click the Advanced button and select the Generate extended result set statement check box.

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, the lrd_result_set_ext function prepares the result set retrieved by the query.

Copy code

    lrd_open_cursor(&Csr11, Con1, 0);
    lrd_stmt(Csr11, "SELECT id, last_name, city, state FROM contact WHERE " "state = 'CA'", -1, 700, 2, 0);
    lrd_exec(Csr11, 0, 0, 0, 0, 0);
    lrd_result_set_ext(Csr11, 1 /*Succeed*/, 4046 /*Done*/, 1, 4046, 0);
    lrd_result_set_ext(Csr11, 1 /*Succeed*/, 4041 /*Cursor*/, 1, 4046, 0);
    lrd_bind_col(Csr11, 1, &id_D7, 0, 0);
    lrd_bind_col(Csr11, 2, &last_name_D8, 0, 0);
    lrd_bind_col(Csr11, 3, &city_D9, 0, 0);
    lrd_bind_col(Csr11, 4, &state_D10, 0, 0);
    lrd_fetch(Csr11, -5, 0, 0, PrintRow8, 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: