Click or drag to resize

IsReadOnly Function

X#
Determines whether a table or database is opened read-only.

Namespace:  XSharp.VFP
Assembly:  XSharp.VFP (in XSharp.VFP.dll) Version: 2.19
Syntax
 FUNCTION IsReadOnly(
	uArea
) AS LOGIC CLIPPER
Request Example View Source

Parameters

uArea (Optional)
Type: Usual

Return Value

Type: Logic
Logical
Remarks
ISREADONLY( ) returns true (.T.) if a table is opened read-only; otherwise, ISREADONLY( ) returns false (.F.). You can open a table read-only by including the NOUPDATE option when opening the table with Use, by checking the Read Only check box when opening the table from the Open dialog box, or by assigning MS-DOS read-only attributes to the table. You cannot pass a non-current database alias to the ISREADONLY( ) function. To ensure that a database is present, you can use code such as the following:
X#
1!EMPTY(DBC())
A cursor created with the Select – SQL command is always read-only.
Examples
X#
1Close Databases
2Open Database (HOME(2) + 'data\testdata')
3Use customer    NOUPDATE  // Open customer table read-only
4Clear
5? ISREADONLY('customer')  // Returns .T.
See Also