On Thu, 27 Apr 2000, Robert McKenzie wrote:
> another error:
>
> You are iterating FORWARD through the db and calling DmRemoveRecord.
> DmRemoveRecord deletes this record and shifts all subsequent records
> down (giving them one lower index), decreasing the total number of
> records. Thus you are quite likely to (1) skip records, since you
> are iterating your index, and (2) call DmQueryRecord with an index
> beyond the end of the database, resulting in "a fatal error message
> if the index is out of range" (Palm OS SKD Reference, pg 493, ver 3.5,
> preliminary modified 1/7/00). If you must use DmQueryRecord, you
> should walk the db from back to front...
>
> -bob mckenzie
> <[EMAIL PROTECTED]>
I've also found that just always removing record 0 works pretty well. For
some reason I was running into problems for some reason.
for(i=1; i<=numrecords; i++) {
DmRemoveRecord(DB, 0);
}
Just another way to go about it.
--
Brian Mathis
Direct Edge
http://www.directedge.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html