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 External Function API » External function prototypes


an_extfn_result_set_column_data structure

Used to return the data values for columns.

typedef struct an_extfn_result_set_column_data {
    a_sql_uint32                        column_index;
    void *                              column_data;
    a_sql_uint32                        data_length;
    short                               append;
} an_extfn_result_set_column_data;
  • column_index   The ordinal position of the column which starts at 1.

  • column_data   Pointer to a buffer containing the column data.

  • data_length   The actual length of the data.

  • append   Used to return the column value in chunks. Set to 1 when returning a partial column value; 0 otherwise.


The following code fragment shows how to set the properties for objects of this type and how to return the result set row to the calling SQL environment.

int DeptNumber = 400;
char * DeptName = "Marketing";

col_data[0].column_index = 1;
col_data[0].column_data  = &DeptNumber;
col_data[0].data_length  = sizeof( DeptNumber );
col_data[0].append  = 0;

col_data[1].column_index = 2;
col_data[1].column_data  = DeptName;
col_data[1].data_length  = strlen(DeptName);
col_data[1].append  = 0;

extapi->set_value(  arg_handle,
                (an_extfn_value *)&rs_info,
See also