ISREADONLY()

From Lianjapedia
Jump to: navigation, search

Purpose

Function to determine if a table is open readonly

Syntax

ISREADONLY([<expN> | <expC>])

See Also

ALIAS(), AUSED(), DATABASEEXISTS(), DBF(), INUSE(), ISRLOCKED(), NDX(), SELECT(), SET EXCLUSIVE, TABLEEXISTS(), USE, USED()

Description

The ISREADONLY() function with no parameter specified, returns .T. if there is a table open readonly (USE...NOUPDATE) in the current workarea and .F. if the current workarea is empty or the table is open for update. The <expN> is a numeric expression giving a workarea number in which to check. The <expC> is a character expression giving a workarea letter, (A-Z/a-z excluding M/m) or a table alias to check for an open table. The alias can be specified in the USE command. If not specified, the table basename is used.

Example

open database southwind
use customers in 1 
use orders in 2 noupdate
? isreadonly(1)              // .F.
? isreadonly(2)              // .T.
? isreadonly("customers")    // .F.
? isreadonly("orders")       // .T.
? isreadonly()               // .F.