The only thing I would suggest changing is to check if the LOCALID variable
is greater than zero. I understand that this seems to be equivalent to the
code you have in place, but this is what I use in my palm apps, and I don't
recall having the problem you do. Another suggestion would be to explicitly
set your DmOpenRef variables to NULL after you execute a DmCloseDatabase. I
have found situations where the DmOpenRef appeared to be valid, but it
actually wasn't. Good Luck!
Steve
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
[EMAIL PROTECTED]
Sent: Tuesday, January 16, 2001 5:59 PM
To: Palm Developer Forum
Subject: Re: Works on POSE, but not in real life
> For some bizarre reason, this code which opens, or creates and then
opens -
> a database works great on POSE, all ROM versions, but fails in real
devices.
> I have (want) two databases and on the second run through this function,
it
> finds the database (which doesn't exist) and then fails to open it becuase
> it cant find the resource.
Matt,
I can verify that your code snippet appears to work on Poser. I can't say
for
sure, since I had to modify your snippet in order to get it to compile.
What error code is DmOpenDatabase returning? dmErrResourceNotFound? If so,
then that totally doesn't make sense to me (that error code is returned only
from DmGetResource and DmGet1Resource). But then, neither does
DmFindDatabase
working if the database doesn't exist.
When you say "all ROM versions", does that include a ROM downloaded from
your
"real device"? Could this be a problem that shows up in a Release ROM but
not a
Debug ROM?
-- Keith Rollin
-- Palm OS Emulator engineer
--
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/