Subject Re: [IBO] RecNo and RecordCount known issues?
Author Lester Caine
Jason Wharton wrote:

>>I'm turning and old application based on BDE into using IBO.
>>In the old implementation I had to keep track with two fields in each
>>table, one for the position and the other one for the table count...
>>After quickly testing the RecNo and RecordCount properties of
>>TIBODataSet, it seems to me that I might actually drop all
>>that useless
>>code... but I wonder: are those two properties reliable?
>>Just wondered whether there are any known issues...
> You should not use these if you can help it.
> They are either very slow or potentially inaccurate.

But only as slow as the COUNT(*) that Rony wants to replace.
The fix is to review if you actually need to count all records, and
perhaps add a table with the count results in - managed by triggers - if
you do need certain 'totals' for navigation purposes.
RecordCount is OK if you need a check of the number of records returned
by a query when you have filtered results, but watch for long delays ;)

Lester Caine - G8HFL
L.S.Caine Electronic Services
Treasurer - Firebird Foundation Inc.