How to count records from a filtered TBufDataset?[SOLVED] lazarus / 16-Databases ---------------------------------------------------------------------- hrayon · 2014-03-27 01:41 How to get the affected number of records from a TBufDataset after applying a filter? RecordCount always returns everything, with or without filter. Thank you. ---------------------------------------------------------------------- mangakissa · 2014-03-27 08:11 something like this: Code: [Select]function FilterRecordCount(dataset : TDataset) : integer; begin   try     result := 0;     dataset.disablecontrols;     dataset.first;     while not dataset.eof do     begin        result := result + 1;        dataset.next     end;   finally     dataset.enablecontrols;   end; end; ---------------------------------------------------------------------- hrayon · 2014-03-27 23:06 It worked, thank you. I find it strange about the field absence or property with that value, since probably when applying the filter, the dataset is traversed.