I just did a program and looped 3000 times, and I got the same value.... I'm
almost positive that as long the Database is opened and you don't create
more databases, the index doesn't change.


"Hector Malpartida" <[EMAIL PROTECTED]> wrote in message
news:54870@palm-dev-forum...
>
> My problem is that I need to reference a database using just two bytes
> (can't use a LocalID), and I'm wondering if using that 'index' I'm fine..
or
> not.
>
> The idea is sending as parameter this 'reference' (UInt16) and then loop
> through the databases and get the LocalID again.... of course the database
> will be opened all the time.
>
>
> "John J. Corelli" <[EMAIL PROTECTED]> wrote in message
> news:54868@palm-dev-forum...
> >
> >
> > The documentation of DmGetDatabase says:
> >
> > "Call this routine to retrieve the database ID of a database by index.
> > The index should range from 0 to DmNumDatabases-1.
> > This routine is useful for getting a directory of all databases on a
> > card. The databases returned may reside in either the ROM or the
> > RAM. The order in which databases are returned is not fixed;
> > therefore, you should not rely on receiving a list of databases in a
> > particular order."
> >
> > that means that the value of the index can change meanwhile the database
> is
> > opened????? or just that there is no order at all??
> >
> >
> > I think what they are saying here is that you can't expect the database
to
> > be at the same
> > index the next time you do a DmGetDatabase.  I believe the index is
fixed
> > while you have
> > a valid DmOpenRef handle to it (while you have it open).
> >
> > John
> >
> >
> >
>
>
>
>



-- 
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