Aaron Ardiri wrote:
>
> > 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?

One alternative is to use DmGetDatabase() to iterate through all of the
databases on the device and stop if you find one with a matching dbID.

__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

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

Reply via email to