Hi Adrian.

Sorry, but it looks like you are doing something wrong by keeping a local ID
for a data base that might not exist.

For a RAM-based DB, its ID is used as a handle to retrieve DB info.
After the DB has gone, the handle content is unpredictable

As better DB identification I can suggest 
        DataBaseName (that is 32 bytes long, but you want smth stable, don't
you)  
        CreatorID+Type (8 bytes only and no possible DB name clash!)  

Michael


-----Original Message-----
From: Adrian Pfisterer [mailto:[EMAIL PROTECTED]]
Sent: Friday, 11 January 2002 13:01
To: Palm Developer Forum
Subject: checking for existence of a database



Seems like this should be easier.  I need to check for the
existence of a database (prc or pdb) and all I have is the
local id (dbid).  

One would think that calling one of the
Dm*** calls that takes the local id as the parameter would
be the way to go, just check the return code or, if 0, check
DmGetLastError().  But when I pass in the local id for
a database that has been deleted (that's what I'm trying to
check for, whether or not it has been deleted) I get a
fatal error in the call itself (MemoryMgr.c; free handle).
This happens in DmDatabaseInfo, DmOpenDatabase, and 
DmDatabaseSize.

How can I check for the existence of a database with just
the local id?

thx...Adrian.

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

-- 
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