sqlany_get_column( a_sqlany_stmt *, sacapi_u32 , a_sqlany_data_value *) method

Fills the supplied buffer with the value fetched for the specified column.

Syntax

public sacapi_bool sqlany_get_column ( a_sqlany_stmt * sqlany_stmt, sacapi_u32 col_index, a_sqlany_data_value * buffer)

Parameters

Returns

1 on success or 0 for failure. A failure can happen if any of the parameters are invalid or if there is not enough memory to retrieve the full value from the SQL Anywhere database server.

Usage

For A_BINARY and A_STRING * data types, value->buffer points to an internal buffer associated with the result set. Do not rely upon or alter the content of the pointer buffer as it changes when a new row is fetched or when the result set object is freed. Users should copy the data out of those pointers into their own buffers.

The value->length field indicates the number of valid characters that value->buffer points to. The data returned in value->buffer is not null-terminated. This function fetches all the returned values from the SQL Anywhere database server. For example, if the column contains a blob, this function attempts to allocate enough memory to hold that value. If you do not want to allocate memory, use sqlany_get_data() instead.