You need to keep track of all the insertions and deletions yourself.  We ended up 
coding a technique where we had data in record 0
of the database increment every time a record was added and decrimented upon deletion. 
 Thus, getting the record count was a simple
read.  When you call DmNumRecordsInCategory() it does a search and count every time 
you call it.

Just put together a group of functions for record management that does the DmXX() 
calls you need but also does your amount
tracking.  Have the rest of your app use these new functions and you should be fine.

Steve

Richard Burmeister wrote:

> From: "JB Parrett" <[EMAIL PROTECTED]>
> > >If I delete a record DmNumRecords() counts it anyway.
> > >How can I count only the records that are not deleted?
> >
> > Use DmNumRecordsInCategory(gDB, dmAllCategories); This skips the
> > deleted records.
>
> 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?
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe, please see 
>http://www.palm.com/devzone/mailinglists.html


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to