Not to be trite or offensive, but how about you try it and see?
There is much to be learned from just trying stuff.
If you have trouble, ask for help.

On 7/14/06, Dominic Kao <[EMAIL PROTECTED]> wrote:
Hi,

I currently have a single database in my program but would like to have a 
second one.  How do I do this?  Can I simply create a second database and open 
that one as well?  Here is an outline of my code:

//global var
DmOpenRef gDB = 0;
//code in AppStart
gDB = DmOpenDatabaseByTypeCreator(kDBType, kCreator, dmModeReadWrite);
       if (!gDB) {
               error = DmCreateDatabase(0, kDBName, kCreator, kDBType, false);
               if (error)
                       return error;
               /* If there is no error creating the database, open it. */
               gDB = DmOpenDatabaseByTypeCreator(kDBType, kCreator, 
dmModeReadWrite);
               if (!gDB)
                       return DmGetLastErr();
       }

I am now able to use gDB as a reference to my database.  How easy would it be 
to just create another reference, say DmOpenRef dDB = 0; and have it referring 
to another database?  Any help/advice would be awesome, thanks!
--
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/



--
yisdersomenimororsisasisdenderisorsis?
Jeff Loucks

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

Reply via email to