Hi,
D5 and v6 Zeos.
I'd like to know the actual RecordCount of a DataSet.
If it is Filtered then RecordCount only returns the available records as Filtered.
TDbf has an ExactRecordCount which always shows the total Records regardless of Filtering or Indexes.
Does Zeos have anything like that?
I want to use...
Label1.Caption:=IntToStr(tbl1.RecordCount)+' of '+
IntToStr(tbl1.TotalRecordCount);
Possible?
Thanks
Filtered and Real Record Count?
Filtered and Real Record Count?
Thanks
Dyslexic Bob
Dyslexic Bob
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Thanks Jan,
But that would only be true when the file is opened. If the user adds or deletes records then it will not work.
I am getting around it for the time being with a query, this may be useful for others as it ignores any filtering etc...
But that would only be true when the file is opened. If the user adds or deletes records then it will not work.
I am getting around it for the time being with a query, this may be useful for others as it ignores any filtering etc...
Code: Select all
function GetAllRecCount : String;
begin
qryStock.Close;
qryStock.SQL.Clear;
qryStock.SQL.Add('SELECT * FROM tblStoc';
qryStock.ExecSQL;
qryStock.Open;
Result:=IntToStr(qryStock.RecordCount);
qryStock.Close;
end;
Thanks
Dyslexic Bob
Dyslexic Bob