Difference between revisions of "ISREADONLY()"

From Lianjapedia
Jump to: navigation, search
Line 27: Line 27:
 
[[Category:Table Basics]]
 
[[Category:Table Basics]]
 
[[Category:Table Basics Functions]]
 
[[Category:Table Basics Functions]]
 +
[[Category:Cursor Functions]]

Revision as of 04:53, 7 December 2012

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.