Michael is correct. Don't use the LocalID to store a reference to a database
that can be deleted. A LocalID is really just a card-relative handle. Palm
OS doesn't provide a mechanism for validating handles, pointers, or
LocalIDs. There is nothing preventing some other handle, pointer, or LocalID
from occupying the same location in memory later.

> DataBaseName (that is 32 bytes long, but you want smth stable, don't
> you)

Add card number (2 bytes) to this, particularly if you want to support
Handspring devices. Use DmFindDatabase to map a card number and name to a
(card number and) LocalID.

> CreatorID+Type (8 bytes only and no possible DB name clash!)  

This works for applications, since the Launcher only provides access to a
single database with type 'appl' and any given creator. But generally
speaking, there can be many databases with the same type and creator, even
on a single card.

If you're referring to your own database, you may be able to get away with
storing something smaller, depending on the conventions you use for creating
the database. For example, if all your databases have type 'DATA', creator
'MyCR', and names like "DATA001-MyCR", you could store just a 3-digit
number.
--
Danny @ Palm

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to