Ok, here's my take on the UID issue...
I've been "depending" on UniqueID's since 2.0 came out, but discovered the
hard way that at that point the desktop/ROM (never did quite figure out the
exact culprit) was arbitrarily reassigning UniqueID's upon a restore. So any
databases that linked to a reference database by UniqueID would then be
hosed.
After much email on this list and to and fro palm, It was fixed, first I
believe in the network Hotsync version of 2.0, and is now supposedly fixed.
That is, I the UniqueID's remain persistant, even after a restore. So one
can use them for indexing, but I would provide yourself a parachute, in case
of difficulty
Take note in what our friend Mark (sorry mark, snipped your last name by
mistake) says:
>"Challenging" is putting it mildly. I take this approach: I use unique
>IDs, because I need the performance, but I also store a copy of the
>unique ID in the record itself. Then when my app receives a
>sysAppLaunchCmdSyncNotify, indicating a "restore" has happened, I run
>thru all the records and use DmSetRecordInfo to set the UID back to what
>it originally was.
>Another problem, which doesn't seem to be well known, is that unique IDs
>are NOT guaranteed to be unique. It is possible for the OS to assign
>the same "unique" ID to two different records in a database. This is
>normally unlikely, but the more "restore" operations that happen on a
>database, the more likely it becomes. Certain usage patterns can make
>it more likely also; if you create one record and leave it alone
>forever, and then create and delete more records, you are *guaranteed*
>that you'll eventually get another record with the same UID as the first
>one.
I for one do the same. My main reasons are for performance, as this thing
really grunts when you try to index big (greater than 1000 record) database
on internal ID's, despite having the database in question pre-sorted.
I am frankly suprised that more people haven't complained more about this,
it is a major pain to write a complete set of database routines to handle
indexing, inserting, searching, whatnot. But it's par for the course with
developing stuff for the palm, ie :bootstraps...
Thoughts:
I took a little look at oracle lite the other day, and it has a shared
library like component. I couldn't find any published api, so I am not sure
of it's capabilities. Does anybody have any experience with it, it's
capabilities and api interface?
Also, there is this chap, but this is far from complete. It is a great idea
(open source!) but alas I am a humble programmer and don't have much time to
devote to it.
http://vger.rutgets.edu/~tdyas/pilot
Finally, what about a collection of C++ data index/search/sorting classes? I
have a number written right now, but is anybody else exploring this path?
best regards
Nick
SoftCare