I just finished doing this.  I originally started by using a database of
database names, but then realized it wasnt needed.

My app only requires one DB open at any time. To let the user pick which one
to open, I dynamically fill a List with the names of DBs by seraching for
them by creator ID and type with DmGetNextDatabaseByTypeCreator.  I felt
this is better that the first idea because if something happens to the
Database of Database names, then all those Databases will be sitting on the
palm and not have any way to get to them.

As per the "Palm Companion" document, I 'behind the scenes' add and remove
" - XXXX" with XXXX being my creator ID, to the end of each DB name (the
name is user set) to make them unique.  The user only sees the name that
they typed in, but the actual name of the DB is "Users name - CRID"

-Mike





Carl Smith <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
>
> Dave-
>
> Thanks for the great suggestions, I forgot about the number 2 way. Good
> deal.
>
> I like 2 because coming in and out of the application the database names
are
> always accessible, of then 3 I assume would work that way to, but I have
not
> done much with the feature manager.
>
> Again thanks for the enlightment Dave,
>
> Carl
>
>
> "Dave Carrigan" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> >
> > "Carl Smith" <[EMAIL PROTECTED]> writes:
> >
> > > Thanks for taking the time to respond to my post, but I do know the
> > > fundamentals of the PalmOS. Maybe I wasn't clear, but my situation is
> that
> > > if I am creating an unknown about of databases how would one go about
> > > creating the name (nameP) of the database and reference this name
across
> > > mutiple c files. Such as DBName1, DBName2 and etc. Could one keep the
> > > database names in an array and reference them across other c files by
> > > calling something like DBName[1]? But then how would one make them
> extern to
> > > other files?
> >
> > There are lots of ways to approach this.
> >
> > 1. Keep the database names in a global array, linked list, etc. See any
> >    C programming reference for how to declare global variables that are
> >    accessible between compilation units.
> >
> > 2. Store the database names in the preferences database and access them
> >    with the Pref* functions.
> >
> > 3. Store the database names using the feature manager and access them
> >    with the Ftr* functions.
> >
> > 4. Create the databases with different data types, then search or open
> >    them using DmGetNextDatabaseByTypeCreator() or
> >    DmOpenDatabaseByTypeCreator().
> >
> > --
> > Dave Carrigan ([EMAIL PROTECTED])            | Yow! NEWARK has been
> REZONED!!
> > UNIX-Apache-Perl-Linux-Firewalls-LDAP-C-DNS | DES MOINES has been
> REZONED!!
> > Seattle, WA, USA                            |
> > http://www.rudedog.org/                     |
> >
> >
>
>
>
>





-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to