Another point, it would be better if you unlock the handle before
removing the record.
Edward P. Ross wrote:
> I have a trivial problem but I need another set of eyes. Here's my
> situation:
>
> I have a table that has a column of checkboxes and a text field, based
> on whether the checkbox is checked I want to delete the record so I want
> to loop through the records, deleting each one that needs to be deleted.
>
> This code deletes records but it varies from what should happen. My
> question is what is the best way to do this? and Does using
> DmRemoveRecord change the record numbers of the existing records?
>
>
> for (i = firstRecordNumber; i < totalNumber; i++) {
> recH = DmQueryRecord((gMyDB), (i));
> if (recH) {
> recP = MemHandleLock(recH);
>
> if (recP->Completed == false) {
> DmRemoveRecord(gMyDB, i);
> }
> }
> }
>
>
> Any help would be appreciated.
>
> Thanks,
> Ed.
>
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/