Subject | isc_dsql_sql_info + isc_info_sql_records: what`s wrong? |
---|---|
Author | Maxim Smyatkin |
Post date | 2010-08-05T14:12:39Z |
Hello all,
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.
But! after this code i checking current query type with:
gchar type_item[] = { isc_info_sql_stmt_type };
isc_dsql_sql_info (status_vector, &e_cursor->stmt,
sizeof (type_item), type_item,
sizeof (res_buffer), res_buffer);
and it works excellent!
so, someone knows what`s wrong? Thanks!
[Non-text portions of this message have been removed]
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.
But! after this code i checking current query type with:
gchar type_item[] = { isc_info_sql_stmt_type };
isc_dsql_sql_info (status_vector, &e_cursor->stmt,
sizeof (type_item), type_item,
sizeof (res_buffer), res_buffer);
and it works excellent!
so, someone knows what`s wrong? Thanks!
[Non-text portions of this message have been removed]