Example: lrd_send_data
In the following example, the lrd_data_info function specified the I/O descriptor number, 1. The lrd_send_data function, using this I/O descriptor number, sends characters to the server as specified by the TotalLen keyword. Note that lrd_data_info and lrd_send_data do not need to use the same cursor, only the same I/O descriptor.
lrd_open_cursor(&Csr9, Con1, 0); lrd_stmt(Csr9, "select * from sampletext", -1, 148, -99999, 0); lrd_exec(Csr9, 0, 0, 0, 0, 0); lrd_result_set(Csr9, 1 /*Succeed*/, 4040 /*Row*/, 0); lrd_bind_cols(Csr9, BCInfo_D2, 0); lrd_fetch(Csr9, 1, 0, 0, PrintRow1, 0); lrd_data_info(Csr9, 2, 1, "", 0); lrd_bind_cols(Csr9, BCInfo_D4, 0); lrd_fetch(Csr9, 0, 0, 0, PrintRow2, 0); /* Note: no rows returned by above lrd_fetch */ lrd_result_set(Csr9, -205 /*End results*/, 4046 /*Done*/, 0); . . . lrd_open_cursor(&Csr10, Con2, 0); lrd_stmt(Csr10, "", -1, 151, 193, 0); lrd_assign(&_2_D5, "T", 0, 0, 0); lrd_send_data(Csr10, "", 1, "TotalLen=45;Log=1", &_2_D5, 0); lrd_assign(&_2_D6, "h", 0, 0, 0); lrd_send_data(Csr10, "", 1, "", &_2_D6, 0); lrd_assign(&_2_D7, "i", 0, 0, 0); lrd_send_data(Csr10, "", 1, "", &_2_D7, 0); lrd_assign(&_2_D8, "s", 0, 0, 0); ... lrd_send_data(Csr10, "", 1, "", &_2_D49, 0); lrd_exec(Csr10, 0, 0, 0, 0, 0); lrd_result_set(Csr10, 1 /*Succeed*/, 4042 /*Param*/, 0); lrd_bind_cols(Csr10, BCInfo_D51, 0); lrd_fetch(Csr10, 1, 0, 0, PrintRow3, 0); If timestamp was activated, it appears in the grid at this point.