« Linux WebKit Support … | Home | Real Studio 2012 Rele… »

SQLite Backup Functions

We are adding backup functions to our MBS Real Studio SQL Plugin. This way you can do online backups of your SQLite database. Even if your normal app uses SQLite using REALSQLDatabase class, you can still open a second connection with our plugin and do a backup while the database. Read about the backup functions in sqlite here.
Code is like this:

      dim s as SQLite3MBS = con.NativeAPI
dim b as SQLite3BackupMBS = s.BackupInit(conBackup, "main", con, "main")

if b<>nil then
while s.BackupStep(b, 100) = s.kErrorOk
// show progress

if s.Backupfinish(B) = s.kErrorOk then
MsgBox "backup okay"
end if
MsgBox "Failed to start backup."
end if

As you see, you get the native API of the SQL connection with the SQLite3MBS class. There you call backup methods there. You keep and pass the SQLite3BackupMBS object to the functions. The biggest plugin in space...
21 08 12 - 12:55