In article <33835@palm-dev-forum>, Dave Carrigan <[EMAIL PROTECTED]> wrote:

> "Bulent Gecer" <[EMAIL PROTECTED]> writes:
> 
> > My application maintains a number of databases that all have the same type
> > and creator, and version number.
> > Now, I would like to open these successively, but just a single and
> > different one each time I launch my application
> > from the application launcher.
> > 
> > How would I do this?
> > 
> > I'm trying to use
> > DmGetNextDatabaseByTypeCreator(newSearch, stateInfoP, myDBType, myAppType,
> > latestVer, &cardNo, &dbID)
> > with newSearch=true the first time I launch my application and invoke the
> > function and then false the next number of
> > times I launch my application.  I'm trying to store the stateInfoP in a
> > feature to be able to continue the search
> > from the last invocation but I can't seem to do it right.
> 
> I would bet that the state info is not likely to be valid between
> application launches, so saving it and hoping it'll still be OK on the
> next launch is probably playing with fire.
> 
> I think the best approach would be to iterate through the list once,
> store the local ids in a database, and then go sequentially through that
> database, picking the next local id each time you launch your app.

Don't store the local ids, because you can't verify whether they are still
valid at the next launch. Store the database names (and card number).
-- 
Remo Hofer <[EMAIL PROTECTED]>
http://www.geocities.com/SiliconValley/Cable/5206/

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