From Xojo Documentation
|You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!|
Backs up the database asynchronously or synchronously. You must be connected to the destination database and its original contents (if any) will be overwritten by the backup.
The backup works asynchronously by default, to receive feedback implement the SQLiteBackupInterface and supply it as the callbackHandler. The sleepTimeInMilliseconds is used to control how often chunks of data are backed up. Increase it to backup less frequently, making your app more responsive.
If you prefer this to work synchronously supply a sleepTimeInMilliseconds of -1. Your app will stop at the backup command and wait for the backup to complete.
You can also use the Backup command to copy an in-memory database to disk.
Back up a previously connected database synchronously. This means you app will pause and wait for the backup to finish:
If backupDBFile <> Nil Then
Dim backupDB As New SQLiteDatabase
backupDB.DatabaseFile = backupDBFile
If backupDB.CreateDatabase Then
db.Backup(backupDB, Nil, -1)