Where do you put the sqlite file

Relative to the application, where do you put your sqlite databases?
Maybe it should be in a users home folder somewhere?

Applications Support folder
don’t put it in the users home, that would limit it to only that user

We usually put it in the Application Support folder (look at SpecialFolders). Do NOT put it next to the application because that’s recipe for disaster. Most OS’s like to make that a read only directory.

A case could be made to put it in the users Documents directory if it really is user specific data.

One issue I ran into with the Documents folder is occasionally is if the machine is on a company network and the IT department has moved the Documents folder out of the default location on the C: drive onto a network drive for easier maintenance. When the user disconnects from the network and doesn’t have access to the network location, that’s a problem. The Application Support folder has been so much less troublesome.

ApplicationData

Fair enough. To be honest I can’t think of a single project where I put something in the Documents folder so this is good information to think about during the design phase. Application Data is our default.

Agreed.

Even when an application offers an alternative place for the user to choose a different folder or drive or machine to store the database on. The application has to have a spot to go and look for the details of that user location for the database. So some might use the registry or likes of and great, but not all OS platforms sport such. Play it safe and stay with the well tested and tried choices that pure Xojo constants give it will deliver reliability.

Yep, don’t get cute, and put it where it goes. Take the time to write a routine that checks for the presence of the folders/files you expect for your application to work. If they are not there, then it creates them. It handles the initial run of your program to lay down what you need, and is self-correcting if the user removes one or more of them for some reason. Write it once and get it working and you can use it over and over again in other projects, only having to modify what the names of the specific folders you actually need for the app.

[quote=210290:@Dave S]Applications Support folder
don’t put it in the users home, that would limit it to only that user[/quote]
ApplicationData is user specific, too. Use SharedApplicationData if you want it available to all users on the machine.

Application Support directory and ApplicationData directory are two distinct locations
and no where did I ever mention ApplicationData

SharedApplicationData is an XOJO construct that refers on OSX to “APPLICATION SUPPORT”

[quote=210336:@Dave S]Application Support directory and ApplicationData directory are two distinct locations
and no where did I ever mention ApplicationData

SharedApplicationData is an XOJO construct that refers on OSX to “APPLICATION SUPPORT”[/quote]
SpecialFolder.ApplicationData is user-specific on all platforms. On OS X, it points to ~/Library/Application Support.
SpecialFolder.SharedApplicationData is system-global on Mac and Windows, unavailable on Linux.

http://documentation.xojo.com/index.php/SpecialFolder

I’m pretty sure that is exactly what I have already said… twice

[quote=210290:@Dave S]Applications Support folder
don’t put it in the users home, that would limit it to only that user[/quote]

ApplicationData means SpecialFolder.ApplicationData which means ~/Library/Application Support which is inside the user’s home.

You may have been trying to say “Use Application Support, but don’t use the normal one, use the shared one.” But that doesn’t come across clearly. It reads like “Use Application Support instead because you don’t want to put it in the user’s home.”