Having multiple db's open is trivial (just remember to close them when
you're not using them for a 'long period' as there is a memory overhead in
leaving them open).
DmOpenRef db1, db2;
db1 = DmOpenDatabase...(...);
db2 = DmOpenDatabase...(...);
// Do some stuff here
DmCloseDatabase( db1 );
DmCloseDatabase( db2 );
To link them you can either generate your own indexes (random number,
sequential number, whatever) and store references, or use the unique id's
that are assigned by the OS whenever you create a new record. Either way you
need to have a field in your record that contains the value of the link so
you can find the corresponding record in the other database. If your
reference db is static you might even be able to get away with referring to
it via record indexes - this can be faster, but if you modify this db you
need to resync all the indexes - potentially messy.
Cheers,
Gavin.
-----Original Message-----
From: Todd Cary [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 22, 2001 1:08 PM
To: Palm Developer Forum
Subject: DB question
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?
If so, how do I open each of the DB's and how do I refer to each one?
Many thanks........
Todd
--
Todd Cary
Ariste Software
[EMAIL PROTECTED]
--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/