Equinox Online Help - Language Reference - A to Z

Home

UnlockApplication

Applies to
SyntaxUnlockApplication
Action[Statement] Unlocks a multi-user application so that it can be accessed by another user.
ScopeUsable anywhere.
Notes

This statement causes a locked multi-user application to be returned from exclusive (single-user) mode to multi-user mode. A locked application is exclusive to the locking user.

A locked application can only be unlocked by the user that locked it, as no-one else is able to access the application while it is locked. A locked application is automatically unlocked if the locking user logs out of it.

The system workarea SysError is set to a non-zero value if an error occurs, otherwise zero.

CategoryLocking
See Also ApplicationState, IsLocked, IsLockedByMe, Lock, LockApplication, LockRelated, LockRetry, RetryInterval1, RetryInterval2, Unlock
Example

The following example checks the lock state and attempts to unlock the application, if it is found to be locked.

| The parentheses are required here
| They force a bitwise operation

if (ApplicationState AND 1) then
UnlockApplication
if syserror then Alert "Logging out will unlock it!"
end if