Durgesh Trivedi schrieb:
when i try to count the records frm todo database using the function 
DmNumRecords  it give the count for those records also which are deleted frm 
the data base.

for example
we have 5 records in the data base its show still 5 after we delete the 2 records But it should show 3 records.

It depends what you want. If you use DmDeleteRecord, the record is marked as delete but its entry is not removed from the header. This is for notifying the PC-Program that it is deleted. After Hotsync these records are removed by the Conduit. If you use DmRemoveRecord, the record is removed completely and also DmNumRecord shows you the right number. But you have no notification for the PC-Program.

For counting the records that are not deleted refer to the docs of DmNumRecords. It says: "Records that have the deleted bit set (that is, records that will be deleted during the next synchronization because the user has marked them deleted) are included in the count. If you want to exclude these records from your count, use DmNumRecordsInCategory and pass dmAllCategories as the category."

Thomas

--
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to