IsExclusive Function | |
-- todo --
Returns true (.T.) if a table or database is opened for exclusive use; otherwise, returns false (.F.).
Namespace:
XSharp.VFP
Assembly:
XSharp.VFP (in XSharp.VFP.dll) Version: 2.21
Syntax FUNCTION IsExclusive(
uArea,
nType
) AS LOGIC CLIPPER
[ClipperCallingConventionAttribute(new string[] { ... })]
public static bool IsExclusive(
Usual uArea = default,
Usual nType = default
)
Request Example
View SourceParameters
- uArea (Optional)
- Type: Usual
Specifies the alias of the table for which the exclusive use status is returned.
X# generates an error message if you specify a table alias that doesn't exist.
Or
Specifies the work area of the table for which the exclusive use status is returned.
IsExclusive( ) returns false (.F.) if a table isn't open in the work area you specify.
Or
Specifies the name of the database for which the exclusive use status is returned.
- nType (Optional)
- Type: Usual
Specifies whether the exclusive status is returned for a table or a database.
The table in the remarks section lists the values for nType and the corresponding status returned.
To determine the exclusive status for a database, you must include nType with a value of 2.
Return Value
Type:
Logic
Logical
Remarks
IsExclusive( ) returns a value for the table open in the currently selected work area if you omit the optional
uArea, or cDatabaseName arguments.
A table is opened for exclusive use by including the Exclusive keyword in Use, or by setting Set Exclusive to
On before the table is opened.
A database is opened for exclusive use by including the Exclusive keyword in Open Database.
nType | Exclusive status returned |
---|
1 | Table |
2 | Database |
Examples 1cExclusive = Set('Exclusive')
2Set Exclusive Off
3Set Path To (Home(2) + 'data\')
4Open Data testdata
5Use customer
6Use employee IN 0 Exclusive
7IF IsExclusive( )
8REIndex
9ELSE
10WAIT 'The table has to be exclusively opened'
11ENDIF
12Set Exclusive &cExclusive
See Also