> dbID =DmFindDatabase(0,"test");
> if (dbID != 0) /*find database*/
> {
> gDB = DmOpenDatabaseByTypeCreator(kDBType, kCreator,
> dmModeReadWrite);
> }
>
> I think gDB is not zero,but why not open?
because you are searching for the database using a different query than when
trying to open it.
DmFindDatabase returns the database id (dbID). you can use this id to open
the database and be sure you are trying to open the same database you found
(DmOpenDatabaseByTypeCreator can find different databases).
change your code to something like this:
dbID =DmFindDatabase(0,"test");
if(dbID){
gDB = DmOpenDatabase(0, dbID, dmModeReadWrite);
}
markus dresch (www.palmside.com)
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/