lrd_print

Prints rows fetched by autofetch operation. (ODBC and DB2CLI)

LRDRET lrd_print( LRD_CURSOR *mptCursor mptCursor, LRD_PRINT_ROW_TYPEDEF mpfjPrintRow );

mptCursor A pointer to an LRD_CURSOR structure.
mpfjPrintRowA pointer to a function that prints each fetched row.

In an autofetch, the data is fetched by the exec command, so the combined fetch and print of lrd_fetch is not applicable. lrd_print uses the function pointed to bympfjPrintRow to print the rows.

Return Values

See LRD Return Values.

Parameterization

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

Example

In the following example, lrd_print prints the results of the lrd_exec operation.

/* Set up and execute the SQL statement.*/ 
lrd_stmt(Csr1, "select ename from employee where (sal>=1000)\n", -1, 1, 1, 0); 
lrd_bind_col(Csr1, 1, &D21_ENAME, 0); 
lrd_exec(Csr1, 0, 0, 0, 0); 
lrd_print(Csr1, PrintRow24);