Nevermind - I figured it out (I told you it was Friday).

"Edward P. Ross" wrote:

> I am iterating through a database and getting the number of records that match the 
>search criteria as seen below.  Problem is
> that p1 gets stuck on the first value and never changes.  It does loop through the 
>correct num of times but p1 stays the same.
> It's probably something stupid but it's Friday...
>
> Any help would be appreciated.
>
> Thanks,
> Ed
>
>     // Code to visit every record:
>        for (i = 0; i < totalNumber; i++) {
>            recordH = DmQueryNextInCategory (gSRWorkDB, &pos, dmAllCategories);
>
>            if (recordH) {
>             skelSRWorkDBType * p1 = (skelSRWorkDBType *) MemHandleLock(recordH);
>
>                if (p1) {
>                 if ((StrCaselessCompare(selectedClientText, (Char *) &(p1->PUN)) == 
>0) && (p1->Date >= daysInRangeL) &&
> (p1->Date <= daysInRangeH)) {
>                  number = number + 1;
>                 }
>             MemHandleUnlock(recordH);
>                }
>            }
>            pos++;
>        }



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

Reply via email to