Subject Re: [firebird-support] Re: What API do you use to get affected row count?
Author Nando Dessena
Jeff,

J> Hex 0 1 2 3 4 5 6 7 8 9 A B C D E F
J> -------- ------------------- -------------------
J> 0 171d 0 f 4 0 1 0 0 0 10 4 0 0 0 0
J> 10 0 d 4 0 1 0 0 0 e 4 0 0 0 0 0 1
J> 20 1cc cccc cccc cccc

J> The thing is itemType 0x17 (or 23) is not defined in ibase.h, which has
J> #define isc_info_req_update_count 15
J> decimal 15 is 0x0F

J> As indicated, offset 32, 0x20, has value of 0x01, which is isc_info_end.

23 is isc_info_sql_records, which means you got the information you
requested. Did you pay attention to Dimitry's code? It specifically
tests for isc_info_sql_records in the first byte of the result buffer.

From there you walk the buffer and get the info you need. If you
prefer the quick and dirty way, I have seen code that directly
accesses specific offsets (6 for update, 13 for delete and 27 for
insert) and reads 4-byte numbers from them, but I'm not suggesting you
do that. ;-)

Ciao
--
Nando Dessena
======================================================
I support Firebird, I am a Firebird Foundation member!
Join today at http://www.firebirdsql.org/ff/foundation
======================================================