You can check deleteflag to filter them. In general design, palm's records
are deletd permanently during hotsync...

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Durgesh Trivedi
Sent: Monday, August 07, 2006 1:42 PM
To: Palm Developer Forum
Subject: DmNumRecords

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. 

and if we add more record it will count frm 5.and show the results
according to that.

please help me


here is my code

dbID = DmFindDatabase (0,toDoDBName);
if(!dbID) FrmAlert(ToDoListEmptyAlert);   
dbP = DmOpenDatabaseByTypeCreator ('DATA',sysFileCToDo,dmModeReadWrite);
  if(dbP) FrmAlert(ToDoListOkAlert);              
Rec=(Int32)DmNumRecords(dbP);      
RecNo = MemPtrNew(16);
MemSet(RecNo, 16, '\0');       
field= FrmGetObjectPtr(Form,FrmGetObjectIndex(Form,TextField));  
FrmCustomAlert(ToDoListEmptyAlert,StrIToA(RecNo,Rec ),NULL,NULL);     
                                                      
 MemPtrFree(RecNo);                               
 MemPtrFree(inputData);
        
DmCloseDatabase(dbP);


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




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

Reply via email to