Subject Re: [firebird-support] isc_dsql_sql_info + isc_info_sql_records: what`s wrong?
Author Ivan Prenosil
> I tried to get the number of affected rows with isc_info_sql_records using
> isc_info_sql_records.
> I wrote this code after isc_dsql_execute2:
>
> gchar count_item[] = { isc_info_sql_records, isc_info_end };
> char res_buffer[8];
> gint affect = 0;
> gint length = 0;
> ISC_STATUS status_vector[20];
>
> isc_dsql_sql_info (status_vector, &e_cursor->stmt,
> sizeof (count_item), count_item,
> sizeof (res_buffer), res_buffer);
>
> In result i have: status_vector without any errors and res_buffer contains
> {\002, \000, \000, \000, \000, \000, \000, \000} after all the query types.

Your result buffer is too short, \002 means isc_info_truncated, try this
char res_buffer[32];