Hello All

I'm working with this code to open a DB and if it does not exist then create
it:

if (db = DmOpenDatabaseByTypeCreator(DBType, CreatorID, dmModeReadWrite |
dmModeShowSecret))
  retcode = 0;
  else
  {
   if (retcode = DmCreateDatabase(0, DBName, CreatorID, DBType, false))
    return retcode;

   if (!(db = DmOpenDatabaseByTypeCreator(DBType, CreatorID, dmModeReadWrite
| dmModeShowSecret)))
    return dmErrCantOpen;

   // Set the backup bit.  This is to aid syncs with non Palm software.
   DmOpenDatabaseInfo(db, &dbID, NULL, NULL, &dbCard, NULL);
   DmDatabaseInfo(dbCard, dbID, NULL, &attributes, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL);
   attributes |= dmHdrAttrBackup;
   DmSetDatabaseInfo(dbCard, dbID, NULL, &attributes, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL);
  }

Now. I want to open too another DB at the same time with another "typedef
struct"
I dont understend how to do this if I use DmOpenDatabaseByTypeCreator
becouse the two db's were created by me and their type is 'DATA'

Thanks

Julio





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

Reply via email to