I'm not too worried about the search yet, because even if I use hardcoded indexes into DmQueryRecord, I'm still getting random, unintelligible crap. To make matters worse, there are apparatentely over 20,000 records in this database, and if I use index values of anything over 15 the program crashes.
I can't do a sequential search like that because of the database size, I have to use a binary search, I'm just hoping I don't have to write one myself, since this function seems to do it for me.
You have to write it yourself. The Palm OS implementation is broken for DBs over 16K records, at least on older versions.
Writing a binary search isn't difficult. It does require that your database be sorted on the primary key -- if it's not, then a binary search won't work because there is no ordering guarantee that enables the search routine to elminate half of the records with each pass.
-- Ben Combee, Senior Software Engineer, palmOne, Inc. "Combee on Palm OS" weblog: http://palmos.combee.net/ Developer Forum Archives: http://news.palmos.com/read/all_forums/
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
