npm37 wrote:
--- In [EMAIL PROTECTED], Matt Graham <[EMAIL PROTECTED]> wrote:oh yeah, missed that you are finding a record not adding a new one. but it's still the same. Since your key is a string, just pass the string of the record you're trying to find. If it exists, the functions will return the index of the record after the one you're looking for.
I'm trying to find an existing record in a sorted database, rather than insert a new record. As I understand it, I have to create the packed record with the key value in memory somehow rather than use DmNewRecord. I thought that if I use DmNewRecord and pack it with the key value, it would write the record to the database again? Of course, I could be completely wrong!
Note: passing the string works only because you're doing only a StrCompare in your compare function.
matt
--
For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
