Page 1 of 1
The RecordCount property of the TUniQuery component has a bug
Posted: Thu 05 Aug 2021 15:24
by Wilson Alex
Recently, I found a problem when using the RecordCount property of TUniQuery to determine how many records there are. No matter how many records are queried, the RecordCount property always returns 25. Is there anyone else like me? Is this a bug?
PS: The UniDAC version I am using is 8.4.4 and the SQLite version is 3.34.1.
Re: The RecordCount property of the TUniQuery component has a bug
Posted: Fri 06 Aug 2021 14:23
by FCS
Hello,
The 25 records may be the default settings of Fetch property.
Try set FetchAll := true;
Regards
M
Re: The RecordCount property of the TUniQuery component has a bug
Posted: Tue 10 Aug 2021 14:04
by Stellar
To get the actual number of records, you need to use either the TUniQuery.Options.QueryRecCount property:
https://www.devart.com/unidac/docs/deva ... ccount.htm
var
RecordCount: Integer;
begin
UniQuery1.Options.QueryRecCount := True;
UniQuery1.SQL.Text := 'SELECT * FROM Dept';
UniQuery1.Open;
UniQuery1.RecordCount;
end;