Share this page

# lrd_result_set

Prepares the next result set.

    LRDRET lrd_result_set( LRD_CURSOR *mptCursor, long mliOpt1, long mliOpt2, 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
miDBErrorSeverity | The Error Severity Levels of a failure in a database routine.

The lrd_result_set function prepares the next result set for printing a character string (usually an SQL statement) with a cursor. For CtLib, it issues a ct_result command and in ODBC it runs SqlMoreResults for the current database statement.

See lrd_result_set_ext for information on generating an extended result set function. (CtLib only)

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 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(Csr11, 1 /*Succeed*/, 4046 /*Done*/, 0);
    lrd_result_set(Csr11, 1 /*Succeed*/, 4046 /*Done*/, 0);
    lrd_result_set(Csr11, 1 /*Succeed*/, 4041 /*Cursor*/, 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: