> ... if it is better to open the
> database once the program starts and close it once the
> program is closing or should I just open the database
> as I need it and close it right after ...

Most of the sample apps open their databases in AppStart and close them in
AppStop.

If you're opening another app's database to modify it, you should open it
only when needed. If you have it open when you call SysHandleEvent, it can
cause problems with beam receive. The "owner" app can be sublaunched to
receive a beam at any time, and it'll need write access to its database to
store the new record. See how Datebook's agenda view works with To Do's
database for an example of this.

This advice probably doesn't apply to you, but it might apply to someone
reading this. :)
--
Danny @ Palm

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