DBF ISREADONLY()

From Lianjapedia
Jump to: navigation, search

PURPOSE

Is table readonly

SYNONYM

api_dbf_isreadonly()

SYNOPSIS

#include "lianja_api.h"
 
int	DBF_ISREADONLY()
 
<input parameters>
none
 
<output parameters>
none

DESCRIPTION

The DBF_ISREADONLY() function will return 1 if the currently selected table has readonly access, 0 if it can be updated and -1 if there is no table open in the currently selected cursor.

Whenever a table is opened, the file protection mask defined by the operating system is examined. 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 table can also be opened readonly with the NOUPDATE key word with the command USE.

EXAMPLE

The following example returns .T. if the table in use has readonly access.

#include "lianja_api.h"
 
lianjaapi_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()