I wouldn't recommend attempting to validate a database's LocalID. As you said, it's just a card-relative handle. If you attempt to access the LocalID after the database has been deleted, the following outcomes are possible:
1. Nothing else occupies this space in memory, and your access fails gracefully. 2. Another database occupies this space in memory, and your access succeeds. You then validate the database name and realize what's happened. 3. Something else - not a database header - occupies this space in memory. I'm not sure what will happen in this case. 4. Something else occupies a portion of memory that includes this space in memory. Again, I'm not sure what will happen. Database lookup was optimized in Palm OS 3.1. The databases used to be unsorted. Now they're sorted by type, creator, and version. To take advantage of this optimization, use Data Manager APIs that take a type and creator as arguments: DmGetNextDatabaseByTypeCreator and DmOpenDatabaseByTypeCreator, but not DmFindDatabase. You probably shouldn't bother with a cache. -- Danny @ PalmSource -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
