Equinox Online Help - Language Reference - A to Z

Home

ApplicationClosed

Applies to
SyntaxApplicationClosed
Action[Function] Returns true if the application corrupt flag is not set.
ScopeUsable anywhere.
Notes

If an application terminates abnormally, Equinox sets the application corrupt flag, causing a warning dialog to be displayed each time the application is run un-optimised. If you use the Optimise Database option on the System menu, the flag is cleared automatically.

If you want to automate the process of maintaining database integrity, you can use the ApplicationClosed function to check if the flag is set. If it is not, you can use the Execute VerifyAllDatabases statement to close all databases properly and reset the flag using the ResetApplication statement.

CategoryDatabases
See Also ApplicationState, ChangeLinkage, FlushAllDatabases, ResetApplication
Example

This example checks to see if the application was closed correctly and if it terminated abnormally, resets the flag indicating corruption and attempts to run an optimisation on all of its databases.

if ApplicationClosed = false then
Execute VerifyAllDatabases
ResetApplication
end if