DBF ISREADONLY()
PURPOSE
Is database readonly
SYNONYM
api_dbf_isreadonly()
SYNOPSIS
#include "dbapi.h" int DBF_ISREADONLY() <input parameters> none <output parameters> none
DESCRIPTION
The DBF_ISREADONLY() function will return 1 if the currently selected database has readonly access, 0 if it can be updated and -1 if there is no database on the currently selected workarea.
Whenever Recital opens a database file, it examines the file protection mask defined by the operating system. If the user does not have write access to the file, then the file is opened readonly. The Applications Data Dictionary also defines readonly access controls by user and group IDs in the security option. A database can also be opened readonly with the NOUPDATE key word with the Recital command USE.
EXAMPLE
The following example returns .T. if the database in use has readonly access.
#include "dbapi.h" dbapi_dbf_isreadonly() { int readonly; readonly = DBF_ISREADONLY(); _retl( readonly ); }
SEE ALSO
BLOB_UPDATE(), BLOB_WRITE(), DBF_APPEND(), DBF_DELETE(), DBF_ISEXCLUSIVE(), DBF_LOCKF(), DBF_LOCKR(), DBF_RECALL(), DBF_UNLOCKF(), DBF_UNLOCKR(), DBF_UPDATE(), FIELD_UPDATE(), MEMO_UPDATE(), MEMO_WRITE()