>There is a problem with using DmNumRecordsInCategory: it can be slow. Does
>anyone know of a method that is as fast as DmNumRecords but counts only
>non-deleted records?
There isn't one. DmNumRecords just looks up a number in the database
header, so it is immediate. The number of non-deleted records isn't cached
anywhere, so it will take an amount of time proportional to the number of
records in the database since it needs to look at each record to see if it
is deleted or not. (That is, an O(N) operation for those of you who know
order-of notation.)
DmNumRecordsInCategory does do the count faster than is possible through
the APIs, though. If you really need immediate results, then you should
keep a count of how many records you've deleted, and subtract that from
DmNumRecords's result.
-David Fedor
Palm Developer Support
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html