Where to store properties

Hi I have watched the video Webinar_Using SQLite.mp4, but I think my question is more general about Xojo. In the Webinar, there is only one window, so the DB property is stored under in the window. In an app I am trying to create I have four windows and each of them would need access to the database. So, would I store the DB property in the App instance (or whatever you might call it) or in each of the four window Instances?

You could store it in App and it will be accessible to all the windows. The only downside (depending on your point of view) is that you have to prepend it with"app." in order to use it.

app.DB.SQLSelect(…)

You could create a Module and put DB in it. Then you can use it as just, “DB”.

DB.SQLSelect(…)

It really depends on your personal preferences regarding global variables and namespaces.

That’s neat! Thanks Tim for the quick reply. I guess that a Module seems the best bet so I will go for that. Not that prepending App would be any trouble, except it could be possible to forget, and then get an error.