Switch to: V12V11V10V9V8V7V6V5

VDatabase Class: Journal Methods

VDatabase Class.CheckRollback()

[NEW in v5.0]


CheckRollback( inVdbLocation as FolderItem ) as Boolean


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


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.


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