Type
Control Command

Purpose
The unlock db command is functional only when running DataEase on a LAN (Local Area Network). The unlock db cancels the effect of the lock db command; it unlocks a locked database.

Syntax
unlock db .
Returns
A confirmation message appears on the screen as soon as the database is unlocked.

LAN
On a LAN, if another user is currently using a resource required by the unlock db command, DataEase displays a Resource Conflict message. While this message is displayed, DataEase automatically tries to execute the command at brief intervals.
When the required resource becomes available, DataEase automatically resumes processing and executes the rest of the procedure.
Usage
Once a database is locked by the lock db command it remains locked until an unlock db command is executed or until the user who initiated the lock db command exits from DataEase.

Example
lock db .
record entry "MEMBERS" .
run procedure "PRINT RESERVATIONS" .
unlock db .

This script tells DataEase: (1) Lock the current database, (2) display the MEMBERS form so an operator can enter new member records, (3) when the operator finishes entering records, run the PRINT RESERVATIONS procedure, and (4) unlock the current database.

Note
There's an important difference between the unlock Processing command and the unlock db Control command. The unlock Processing command can be used to unlock individual forms or records during a Processing procedure. The unlock db command is used to cancel the effect of the lock db Control command; it unlocks the whole database.