Switch to: V12V11V10V9V8V7V6V5

VDatabase Class: Journal Methods

VDatabase Class.CheckRollback()

[NEW in v5.0]

Declaration:

CheckRollback( inVdbLocation as FolderItem ) as Boolean

Parameters:

  • inVdbLocation - Location on disk of the database file. Exactly as you will send to db.Open() or db.Create().

Description:

This method allows to check a database before opening if it has a journal in the state right after failure, i.e. open will cause Rollback operation.

If it returns true, you can do something in your application, for example:

  • warn the user by dialog and ask him to copy db + journal before opening (just in case)
  • copy those files automatically
  • anything else you can imagine.

Example:

if db.CheckRollback( db_location ) = false then
    -- do something "paranoid" 
end if
 
db.open( db_location )