Hi all,
In one of my applications I use a SQLite Database, the user has the option to backup and restore the DB to undo changes he made.
For that I create an In-Memory database and using the SQLiteDatabase.Backup methode.
It works as expected if the application is NOT sandboxed, but failes when sandboxed.
It looks like doing the backup is ok, I can open the created In-Memory DB and all tables and data are there - but restoring failes.
(again with the methode SQLiteDatabase.Backup)
The restored DB is empty.
If I deselecte the Sandbox option (AppWrapperMini) all is working normal.
[quote=91743:@Hanspeter Stocker]Hi all,
In one of my applications I use a SQLite Database, the user has the option to backup and restore the DB to undo changes he made.
For that I create an In-Memory database and using the SQLiteDatabase.Backup methode.
It works as expected if the application is NOT sandboxed, but failes when sandboxed.
It looks like doing the backup is ok, I can open the created In-Memory DB and all tables and data are there - but restoring failes.
(again with the methode SQLiteDatabase.Backup)
The restored DB is empty.
If I deselecte the Sandbox option (AppWrapperMini) all is working normal.
Any ideas?
regards Peter Stocker[/quote]
I have the same issue. Did you find a working solution to this issue you can share with us, please?
since the data backup have date and time stamp, the overwriting of the data file would happen. So do you really need to include the checking of backupDBFile.Exists??
Yes, because the user could select an existing File and overwriting such a file does not work with a Sandboxed App. It fails without any Error. Better safe then sorry.
[quote=91743:@Hanspeter Stocker]It works as expected if the application is NOT sandboxed, but failes when sandboxed.
It looks like doing the backup is ok, I can open the created In-Memory DB and all tables and data are there - but restoring failes.
(again with the methode SQLiteDatabase.Backup)[/quote]