"Gordon, Douglas" <[EMAIL PROTECTED]> wrote in message
news:4295@palm-dev-forum...
> Anyway, I fixed this by saving the card & ID of obsolete databases in an
> array while I'm inside the GetNext loop. Afterwords, another loop goes
> through the array and deletes the old databases. This now works correctly.
The trouble with your approach is that you either need to limit the number
of old databases or dynamically resize your array. Another approach is to
restart the loop whenever you delete (or create) databases. Theoretically,
this is slower, but in practice it's generally fast enough. Just set the
newSearch flag to true to start the loop over. If you're both scanning for
"good" databases and deleting "bad" databases in the same loop, you'll want
to split these into separate loops. It sounds like you're warning the user
when you delete old databases, so you probably want to keep track of whether
he was already warned.
--
Danny Epstein
Palm
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html