Subject Getting RowCount by API
Author rj1102
Hi,
FB2:
I'm trying to get the rowcount of a SQL SELECT-execution, using this
code i found on the internet:

var
ResultBuffer: array[0..1048] of Char;
InfoRequest: Char;
begin
Result := -1
if FGDSLibrary.isc_dsql_sql_info(StatusVector, @FHandle, 1,
@InfoRequest, SizeOf(ResultBuffer), ResultBuffer) > 0 then
IBDatabaseError;

if (ResultBuffer[0] = Char(isc_info_sql_records)) then
Result := FGDSLibrary.isc_vax_integer(@ResultBuffer[20], 4);
end;

For small queries this works correctly!! But for larger resultsets
the incorrect row count is returned. So i think something is wrong
with the bufferlength (last line).

Someone has a clue?

Thanx,
Robert