Product Information > JADE Encyclopaedia of Classes – Volume 1 > Chapter 1 - System Classes > changeDbAccessMode

changeDbAccessMode

changeDbAccessMode(mode:  Integer;
                   usage: Integer) updating;

The changeDbAccessMode method of the JadeDatabaseAdmin class changes the access mode of the database.

Use the mode parameter to specify the database access mode that you require. The values for the mode parameter are defined by the JadeDatabaseAdmin class constants listed in the following table.

Constant Integer Value Description
Mode_Archive 4 Database is in archive mode.
Mode_Default 9 Restores database to default; that is, the initial values for mode and usage.
Mode_Exclusive 1 Requests exclusive access to the database. If other users already have the database open, a database mode conflict is reported. Similarly, if one user already has the database open in exclusive mode, other users are prevented from opening the database.
Mode_Shared 0 Database is in shared mode.
Mode_Snapshot 6

Conditions the database for external snapshot backup.

For details about external third‑party snapshot backups, see "Non-JADE Backups" in the Developing a Backup Strategy White Paper.

Use the usage parameter to specify the database usage that you require. The values for the usage parameter are defined by the JadeDatabaseAdmin class constants listed in the following table.

Constant Integer Value Description
Usage_NoAudit 2 Database is not audited
Usage_ReadOnly 1 Your database cannot be updated
Usage_Update 0 Updates to your database are allowed