Each .pdb file will have a 'type' associated with it, which, like the
creator ID, is also a 32 bit integer. I'd use different types for both
your databases, even though both have the same creator ID, and open them
like so:
dmOpenRef1 = DmOpenDatabaseByTypeCreator( 'Typ1', 'CRID', ... );
dmOpenRef2 = DmOpenDatabaseByTypeCreator( 'Typ2', 'CRID', ... );
Replace 'Typ1' and 'Typ2' with whatever you choose for your database
types. The 'type' (a UInt32) is separate from the database "name" (your
"dbaseA" and "dbaseB"), which is a string. You could also use
DmFindDatabase() to find the database ID using your database name
strings and then pass the found database ID to DmOpenDatabase(). I
always use DmOpenDatabaseByTypeCreator(), though, so I don't know of any
quirks that might come along with the other method.
-----Original Message-----
From: Marvin [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 25, 2001 9:17 AM
To: Palm Developer Forum
Subject: How to open two different PDB in one app??
My one app has two different PDB files. Both have same creatorID, but
each
has different PDB name and different database structure.
My problem is this:
I have two press buttons. Button A will need to open DBa while Button B
will
need to open DBb.
Assuming the DB name for DBa is dbaseA and DB name for DBb is DbaseB.
How do I identify which is which???
Thanx in advance
Marvin
--
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/