> From: Todd Cary
> In reading the "Programmer's Bible", I am confused about having more
> than one DB within an application.  Let's say I have a main DB called
> DBMain.  Within that DB I have a field where I store values in a Popup
> list that is populated from DBaux1.
>
> Can this be done?

yes.


> If so, how do I open each of the DB's and how do I refer to each one?

Open DBs are referred to by a DmOpenRef.  For example,

Err err = 0;
DmOpenRef DBMain = DmOpenDatabaseByTypeCreator('Type', 'Crid',
dmModeReadWrite);
if (DBMain == NULL)
  err = DmGetLastErr();

If you want to open another db and keep it open at the same time, use a
different DmOpenRef (e.g., DBaux1).

See the "Data and Resource Manager" chapter of the "Palm OS Programmer's API
Reference" to learn more about the API for dealing with databases.


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

Reply via email to