--- Jackie Yuen <[EMAIL PROTECTED]> wrote:
> I am new to database programming in palm. What I am
> trying to do is to display the content of a pdb file
> (convert from txt file) in the textfield. But I
> encounter problem when I run
> VoidHand imageHandle = DmGetResource(DBTYPE, dbID),
> it gives me MemoryMgr.c NULL handle.
> <snip>
> gDB = DmOpenDatabaseByTypeCreator(DBTYPE, appFileCreator,mode);
> if (!gDB) {
> VoidHand imageHandle = DmGetResource(DBTYPE, dbID);
> <snip>
Your logic is backwards here. DmOpenDatabaseByTypeCreator() returns 0
if the database can not be found. (!gDB) is true when gDB is 0. So,
you are saying, "if I can't open my database, then get a resource from
my database".
__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards�
http://movies.yahoo.com/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/