SQL and multi activities

gadgetmonster

Active Member
Licensed User
Longtime User
Hi,

My app has about 10 different activities all of which need to access a central database.

At the moment I declare my dbSQL as SQL variable in the main activity Process_Globals and access it in other activities using Main.dbSQL.

Now if I leave my app on one of the sub activities and come back to it after a while, I have seen it crash with a not initialised error and it think its referring to Main.dbSQL.

Should I use a dbSQL per activity and initialise it in each of the Activity_Create subs? or

Create and initialise prior to using some sql each time (this causes extra delay)? or

Keep it as it is and check if initialised in the Activity_Resume sub?

Thank you
 
Last edited:
Top