Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (Français) » SQL Anywhere Server - Programming » SQL Anywhere Data Access APIs » SQL Anywhere C API reference » sacapi.h

 

sqlany_get_data function

Retrieves the data fetched for the specified column into the supplied buffer memory.

Syntax
sacapi_i32 sqlany_get_data( a_sqlany_stmt * stmt, sacapi_u32 col_index,
  size_t  offset,  void * buffer,  size_t  size  )
Parameters
  • 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 GB.

Returns

The number of bytes successfully copied into the supplied buffer. This number will not exceed 2 GB. 0 indicates no data remains to be copied. A -1 indicates a failure.

See also