[77308] SQLite and the Resources folder

I read that Issue and do not understand from where this guy takes his references. The Issue subject name is:

Start of Issue title:

SQLite has been changed to load copies of databases in the resource folder

End of Issue title

and in the descrption field:
Start of Extract from the Issue
After searching the documentation I discovered a note that stated XOJO now moves SQLite files to the resource folder before opening them.
End of Extract from the Issue

I checked the SQLiteDatabase page and see no note at all for that.

Ideas ?

TO the resources folder would be crazy in a compiled app.
They would become read-only to SQLite, surely?

Xojo have deflected the report by saying it shouldn’t have been logged as Issues are for bug reports and feature requests.
If Xojo actually does this (I haven’t tested it myself), this would definitely be seen as a bug by me.

Which is why (amongst about a million other reasons) it would a nonsense to do that and I don’t believe it has happened. I would suspect that the OP doesn’t know what he’s doing (I don’t mean @Emile_Schwarz ).

1 Like

Is from the new ‘feature’ called DatabaseConnection:

Documentation:
https://documentation.xojo.com/topics/databases/connecting_to_a_database.html#topics-databases-connecting-to-a-databases-sqlite-databaseconnection-when-building-your-app

from it:

SQLite DatabaseConnection when building your app

When you use a SQLite DatabaseConnection in your project and you build your app, Xojo will copy your SQLite database into the Resources directory/folder of the built app. You should treat this copy of the database file as read only as applications are often in read-only locations on the end user’s computer.

Yes, Xojo does this but only if you use the new feature ‘DatabaseConnection’.

The “bug” is in the Docs. If you are new and dutifully read the docs to see how to use an SQLite database, you will be sent to this new feature as the way to connect. At the top of this section in the docs, there should be a clear statement of the use case for this feature, with a pointer to the alternative, more general, way of connecting to a database (using db.connect() ).

Now all newbies will assume you always have to use DatabaseConnection to connect to a DB, just as some newbies thought that, because all listbox examples seem to include loading it from a database, that this is the only way to load a listbox, that the listbox has to have a database associated with it, and that the connection between the two is so intimate that when you update the listbox you update the database automatically.

Perhaps I should have been a tech writer.

1 Like

This leads me to think it is better to give a link when talking to something (in the documentation or other) not only here but in Issues too: easier to go to the docs and understand.

Thank you for the answers and sorry to bother you.