Subject Re: What API do you use to get affected row count?
Author Jeff Lynn
Thanks, Nando.

I found the isc_info_sql_records from the ibase.h. Interesting that
it is nowhere to be found in the API doc from Interbase. Must be a
new addition to Firebird after Interbase 6.5.

Since I don't know the definition of the returned info, I dumped all 8
bytes of the buffer, and got the following:

2ffffffccffffffccffffffccffffffccffffffccffffffccffffffcc

I assume the first byte returned " 2" is the number of affected rows.
But then, my test table has a total of three records, and the record
that affected is only the row with id=123. The two other records have
id of 10 and 20 repectively and I expected the affected row count to
be 1, which I verified by browsing all the records (3) in the table.

My update statement is:

"update staff set salary = ? where id=?"

where id=123.

Any idea?

jml