# Lock / Unlock Database

This function is used to lock or unlock one or more databases. When a database is locked all updating from the UI outside of the database viewer is disabled.

If a path is not specified or resolves to be empty at runtime, all open databases will be processed.

The test state is set to reflect the lock staus of a database prior to changing it. For all open databases, a test state of true implies that at least one database was locked. If you only want to test a lock state select Test as the function.

If a specified database is not open or if the supplied path is invalid, the test state will be set to false.

The path may contain any of the escape sequences described in Escape Sequences. At runtime, the path to a database must be absolute (/) or relative to the home folder (~/).