Take the following code:

dbID = DmFindDatabase (0,DBName);
if(dbID)
{ // we found it
     hTempDB = DmOpenDatabase (0,dbID, mode);
     Err e = DmGetLastErr ();

     char tmptxt[200];
     StrPrintF(tmptxt,"Couldn't Open DB. H:%lx, E:%x, ID:%lx, N:%s:",
hTempDB, e, dbID, DBName);

     ErrFatalDisplayIf(!hTempDB, tmptxt);
     WorkDB = hTempDB;
}

This code is run after a user selects a db to open and the DBName is passed
to it.  User has reported intermittent fatal errors at the ErrFatalDisplay.
A reset allows the user to load the database with no problems. So I added
the code above to see the variables.

Got back:

Fatal Alert
data base.cpp, Line:130,
Couldn't Open DB.
H:00000000,
E:0216,
ID:001FEEC1,
N:6/10/04-9:03:16-GFMS:

How can DmFindDatabase return a valid ID, but DmOpenDatabase not be able to
find it?

Thanks,
Mike



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

Reply via email to