If your databases (and your application) have the same creator ID, you will
only see one item in the info section. Are you sure there aren't two
databases or are you assuming there aren't because you don't see them listed
separately? To find and open a series of databases of a particular type
and/or creator, you would call DmGetNextDatabaseByTypeCreator in a loop.
DeAnna
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Matthew
> Starensier
> Sent: Thursday, September 14, 2000 12:09 PM
> To: Palm Developer Forum
> Subject: creating multiple databases
>
>
> I'm a newbie Palm developer.
>
> I am writing an application that needs to store two distinct types of
> records. I want to keep one of these record types sorted by index in the
> database. I assume that this implies that I need to create two databases.
> In my AppStart method, I call DmCreateDatabase twice, but when I tap on
> info, I see that only the database named in the last call seems
> to be shown
> in my list of installed applications and database. The code looks like
> this:
>
> //attempt to open first database, if it doesn't exist, create a new one
> firstDatabase = DmOpenDatabaseByTypeCreator(dbOneType, appFileCreator,
> dmModeReadWrite | dmModeShowSecret);
> if(! firstDatabase)
> {
> DmCreateDatabase(0, DbOneName, appFileCreator, dbOneType, false);
> binkDb = DmOpenDatabaseByTypeCreator(dbOneType, appFileCreator,
> dmModeReadWrite | dmModeShowSecret);
> }
>
>
> //attempt to open secod database, if it doesn't exist, crate a new one
> secondDatabase = DmOpenDatabaseByTypeCreator(dbTwoType, appFileCreator,
> dmModeReadWrite | dmModeShowSecret);
> if(! secondDatabase)
> {
> DmCreateDatabase(0, dbTwoName, appFileCreator, dbTwoType,false);
> tranDb = DmOpenDatabaseByTypeCreator(dbTwoType, appFileCreator,
> dmModeReadWrite | dmModeShowSecret);
> }
>
>
> So my question comes in 2 parts:
> 1) Do I need two databases to keep two sorted collections of disparate
> records, or is there some preffered way of maintaining this
> information in a
> single database?
>
> 2) If I do need two databases, how do I create the second one?
>
> Matthew Starensier
>
> R o m e B l a c k , I n c .
> __________________________________________________________
> i n t e r a c t i v e s o f t w a r e a n d d e s i g n
>
> t e l : 2 1 2 . 7 2 7 . 9 7 3 5
> f a x : 2 1 2 . 7 2 7 . 9 5 4 6
> u r l : http://www.romeblack.com
>
>
> --
> 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/