> > > I have a situation where I have a cardNo and a dbID of a database. At
> > > the time I try to access the database using the dbID, it is not any
> > > longer available (deleted) and my code crashes. What I would like to do
> > > is to check whether the dbID is valid, but I can't seem to find 
> > > anything in the API that does something like this. Any ideas?
> > 
> > surely you can try to use DmOpenDatabase() to see if it really exists.
> > if an invalid dbID and cardNo is provided; surely it'll return an 
> > error code - it should do that at least.
> 
> Doesn't DmOpenDatabase (and about all of the other DmMgr functions) usually
> generate a fatal alert when given an invalid cardNo and dbID?

thats not what the docs say:

Returns DmOpenRef to open database. May display a fatal error message if 
        the database parameter is NULL. On all other errors, this function 
        returns 0 and DmGetLastErr returns an error code indicating the 
        reason for failure.

then again, it has been proven many times that the docs are faulty *g*

---
Aaron Ardiri
PalmOS Certified Developer
[EMAIL PROTECTED]
http://www.mobilewizardry.com/members/aaron_ardiri.php


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

Reply via email to