Sqlite folder location on XOJO Coud

Sorry for the newbie question, but I’m just getting into the development of a web app and this is the first question to pop into my mind.

I will probably use xojo cloud because it seems pretty easy for deployment. However, just wanted to know where do you store your database? I’m probably going to use SQLITE as the backend database because this will not be a very complicated application and I’ve been using SQLITE for desktop applications for years.

Xojo Cloud only allows four of the SpecialFolders, so you’ll have to select one of the available locations: SpecialFolder — Xojo documentation

Do not store it next to the app executable. Just like developing for macOS or Windows, user data could get lost when stored there.

I also offer a pretty easy for deployment tool called Lifeboat that puts you in more control, which does allow for access to more cross-platform data storage locations like SpecialFolder.ApplicationData :slight_smile:

Hi John - Tim’s post covered this but I wanted to say that I would store SQLite databases in SpecialFolder.SharedDocuments.

Don’t put SQLite databases anywhere on a network. See:

https://www.sqlite.org/howtocorrupt.html

Until Web Apps become pre-emptive threaded, it is actually safe to use SQLite with Xojo Web. Due to the cooperative threading, you can’t cause collisions within one instance of a running Web App. Additionally good news, the SQLite Documentation states that multiple instances of the same application can access a single database file at the same time, so load balanced apps are safe as well.

2 Likes