One question... are you inserting the initial data in, then updating the records (changing the sort key, and therefore the sort order), or are you inserting new data into an empty database for each test?
If it's the latter, then DmFindSortPosition should be working. If it's the former, and you're expecting the records to remain correctly sorted after you change them... uh uh... nope... not gonna work. Look into DmInsertionSort or DmQuickSort (better for large databases), and call one of those with your compare function after you change the record(s). That will re-sort them according to your compare function. I do the same thing in one of my apps, and it works like a charm. ---------------------------------------------------------------------- Brian Smith // [EMAIL PROTECTED] // http://www.arthurian.nu/ Software Developer // Gamer // Webmaster // System Administrator "When you understand UNIX, you will understand the world. When you understand NT....you will understand NT" - R. Thieme -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
