Page 1 of 1

PostPosted: Fri Sep 06, 2002 11:38 am
by handfordr

I am trying to count the number of records in a memo, and I am consitently returned an incorrect number regardless of tghe number of lines. The code is below and I am running it on an M515 with 4.1 OS. Can anyone assist.

int recs;

mmfind("test memo");

Kind Regards

Richard Handford

PostPosted: Fri Sep 06, 2002 3:31 pm
by jstadolnik
When a memo is deleted in the PalmOS, the record is emptied out but not removed until the next hotsync. I don't believe these "deleted" records are counted with the mmcount call, however the empty records will still be there.


The PToolboxLib guy.

PostPosted: Fri Sep 06, 2002 8:54 pm
by samps
I'm unsure what it is you want to count.

If it is memos in the memopad use mmcount().

If you want to know the number of lines in a memo:

Open it with mmfind()
make sure you're at the top with mmrewind()
and then
(while not mmeof())
alert("There are "+i+" lines in this memo")



PostPosted: Mon Sep 09, 2002 12:27 pm
by handfordr

Thanks for you help here, I was being particularly thick, and thinking that mmcount return the number of lines in a memo rather than the number of memos in tha database.

Again thanks for you help, and I'll go back under my stone now.

Richard Handford