On Sun, Feb 10, 2002 at 01:48:24AM -0500, Ben A. HiLLeLi wrote: > I've posted this on several newsgroups to no avail... > > I'm working on my first palm app... It is a BIG Palm App involving a > relational database with MANY "tables" (I know they are not really tables, > more like file i/o)... > > I've got one table created, opened and sorted... My question now is related > to the Primary Key. The Unique Identifier in a database used for ID and > linkage to other databases (as a "Secondary Key")... I know that PalmOS > assigns a uniqueID automatically in the database record header (a 3 byte > UniqueID says PalmOS API). My question is: Is > this what I "SHOULD" use as my primary Key?
I would choose to add an incremental field to the tables rather than relying on UniqueID. Store the last incremental value in the database header and increment it each time you add a record. It's very easy to do. IIRC UniqueID's are not guaranteed to remain constant across synchronizations, but I could easily be wrong here. Read the specs. Marco -- ======================================================================== Marco Pantaleoni [EMAIL PROTECTED] Padova, Italy [EMAIL PROTECTED] elastiC language developer http://www.elasticworld.org -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
