Equinox Online Help - Language Reference - A to Z

Home

FlushAllDatabases

Applies to
SyntaxFlushAllDatabases [HowExpression]
Action[Statement] Closes open files not currently in use.
ScopeUsable anywhere.
Notes

When a file is accessed in an application, Equinox also opens all associated files, even if they are not used immediately. To gain maximum performance, these files are kept open until the application is closed. You can override this by periodically closing all open files that aren't currently in use. This can speed up the time taken to recover following a server crash. However, if you close files that Equinox is going to use before the application is next closed, there will obviously be an overhead associated with re-opening those files.

HowExpression is a new optional parameter that allows more control over the record cache:

  • 0 or missing: Close files no longer in use, but still open (as before)
  • 1: Flush the record write cache
  • 2: Stop the record cache
  • 3: Start the record cache
CategoryDatabases
See Also ApplicationClosed, ChangeLinkage, ResetApplication
ExampleThis example asks users if they want to close unused files. AlertButtons "No", "Yes" Alert "Do you want to close unused files?" If SysReply = 2 Then FlushAllDatabases