Retrieves the data fetched for the specified column into the supplied buffer memory.
Syntax
public
sacapi_i32
sqlany_get_data
(
a_sqlany_stmt * sqlany_stmt,
sacapi_u32
col_index, size_t offset, void * buffer, size_t size)
Parameters
-
sqlany_stmt –
A statement object executed by sqlany_execute() or sqlany_execute_direct().
-
col_index –
The number of the column to be retrieved. A column number is between 0 and sqlany_num_cols() - 1.
-
offset –
The starting offset of the data to get.
-
buffer –
A buffer to be filled with the contents of the column. The buffer pointer must be aligned correctly for the data type copied into it.
-
size –
The size of the buffer in bytes. The function fails if you specify a size greater than 2^31 - 1.
Returns
The number of bytes successfully copied into the supplied buffer. This number must not exceed 2^31 - 1. 0 indicates that no data remains to be copied. -1 indicates a failure.