At 11:48 AM 8/22/2001 +0800, Gavin Maxwell wrote:

>Having multiple db's open is trivial (just remember to close them when
>you're not using them for a 'long period' as there is a memory overhead in
>leaving them open).
>
>DmOpenRef db1, db2;
>
>db1 = DmOpenDatabase...(...);
>db2 = DmOpenDatabase...(...);
>
>// Do some stuff here
>
>DmCloseDatabase( db1 );
>DmCloseDatabase( db2 );

This begs the question of technique.

If I have several DBs, each represented by a form, so they need to be open 
when their form is in use, and then all need to be open during other 
operations, should I open 'em all up (about four, I think) on launch, and 
close 'em on AppStop or should I open each one when it's form is on the 
screen, then close it, opening all of them only when I _need_ all of them.

On a disk based machine, the answer is obvious, but on our memory based 
machines, where heap is at a premium, what is the best procedure.

Thanks,

</edg>
Ed Greenberg


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