Ion Popescu wrote:
>I still haven't got the answer to the question I posted.
>I guess the thread got into discussing what is expected
>out of Palm. My question again:-
>
>Should I write a replacement for DmFindRecordByID?
If you're counting on unique IDs remaining constant and your program is
supposed to work with older versions of the OS (pre-3.0, I think), you have
a problem with your software architecture. Unique IDs are not guaranteed to
remain the same in the earlier versions of the OS. I have not verified that
the problem has been fixed in the later versions for that matter.
The main problem as I recall occurs when you do a "restore" operation after
a hard reset. The unique IDs for records get regenerated from scratch and
have no relationship whatsoever to the original IDs.
As a result, building an efficient linked list of database records is quite
challenging. You can't use the standard PalmOS unique IDs. One method is to
put your own unique ID inside each record; however, this has its own
problems. For one, the performance is quite poor since you have to look
inside each record when you are scanning for a particular ID (the PalmOS
unique ID lookup is relatively fast since all the IDs are in a single
array). For another, you have the problem of generating the unique IDs on
multiple desktop systems and in the handheld application without creating
duplicates.
Unfortunately, I don't have a good solution to recommend to you. I'm just
trying to let you know about some of the problems.
Bill Goodman
Cyclos