drop a complete sqlite database in a project ?

I would like to include a (read-only) sqlite database in a macos app.
if I drop the database in the project, it is dropped as an alias, and when I compile the database is not included in the ressources folder.
if I press alt during the drag, I get a green “+” icon, which should say that it will be copied into the project, but it is still an alias, and not compiled in the final app.

is there a way to include the database in the project (and not after compile because I know how to do this !)

thanks.

not by adding that way
a copy file step would copy the actual file to where ever you wanted (like into the app bundle on macOS)

what you get when you drag and drop the file is a db object that refers to that db in its existing location (and you CANNOT move it or that reference breaks)

I think I filed a case some time ago to rework how adding a db like this works as its not terribly useful as is

full explaination : https://documentation.xojo.com/topics/build_automation/introduction.html#Copy_Files

LR ( here ) said:

This sample uses a SQLite Database that was added to the project, so it has to cast the result from db.Prepare. TextField1 is used to enter the search string:

Nota: in the same page, the example code use rs.MoveNext.

I’ve done a click at the wrong line, I wanted the previous one (where you can find in text SQLExecute):

You can send this PRAGMA command to SQLite from Xojo using SQLExecute ( here .

Gee! This would be convenient! I used a shell script at the end of the build process. Note that if you’re going to submit your app to the App Store it isn’t so simple. Even if the sqlite DB is read-only they will still reject the app. What you have to do is copy the DB to the Application Support folder on first start and then refer to it there.

Dave

This was said on this Forum many times, but once more is good too ! :wink: