Daylight v4.9
Release Date: 1 February 2008


dt_thor_setreadonly - manipulate the "readonly" state of a database

Generic Prototype

dt_thor_setreadonly(dt_Handle, dt_Integer, dt_String, dt_Boolean)
=> dt_Boolean

C Prototype

#include "dt_thor.h"

dt_Boolean dt_thor_setreadonly(dt_Handle database, dt_Integer pwlen, dt_String password, dt_Boolean readonly)

FORTRAN Prototype

include ''

logical dt_f_thor_setreadonly(database, password, readonly)

integer*4 database
logical readonly
character*4 password


If "readonly" is TRUE, makes the database read-only; if it is FALSE, makes the database writable.

The parameter "password" must be the executive password for the database. Note that if you are changing a database from read-only to writable, you must open it with "r" (read) permission, since write and executive permission are prohibited; once it is open, you supply the executive password via this function to authorize the change.

A read-only database has some special features: the Thor server doesn't try to set a "lock" file, and the files on disk can be read-only. This means that a read-only database can reside on non-writable media, such as a CD-ROM. (A writable database's files must be individually writable, even if you never open it with write permission.)

Related Topics

dt_database(3) dt_exists(3) dt_getpasswords(3) dt_getusers(3) dt_isopen(3) dt_ispublic(3) dt_setpassword(3) dt_thor_autocrunch_limit(3) dt_thor_cache(3) dt_thor_cachecontrol(3) dt_thor_getauxillarydb(3) dt_thor_readonly(3) dt_thor_setauxillarydb(3)