Reposting as I had the wrong tag.
As far as I can tell, Objo doesn’t provide a wrapper for the SQLite Online Backup API the way Xojo does (SQLiteDatabase.BackUp). A common way for saving an in-memory database is:
sql: VACUUM main INTO 'path\filename.db';
In Objo, ExecuteSQL runs this without raising an error, but no file is created. I wrote a small test program that:
Creates an in-memory database, adds a table, and inserts some data
Runs the VACUUM INTO command
Checks whether the file exists. It does not.
Closes the database
Creates a file-based database, adds a table, and inserts some data
Runs the same VACUUM INTO command to back it up
Checks whether the file exists. The backup file is created.
So VACUUM INTO works from a file-based database but not from an in-memory one. I then converted the test program to Xojo, and there the in-memory database saved to disk without any problem.
I’m not sure why VACUUM INTO fails silently for in-memory databases in Objo. Has anyone else run into this or found a workaround?
Also, would it be possible to add a wrapper for the SQLite Online Backup API? That would give a clean, supported way to persist in-memory databases and do live backups.
The attached test program has hard coded file names in the root of my D:\ drive.