ISEXCLUSIVE( ) Function

Example   See Also

Returns true (.T.) if a table or database is opened for exclusive use; otherwise, returns false (.F.).

Syntax

ISEXCLUSIVE([cTableAlias | nWorkArea | cDatabaseName [, nType]])

Returns

Logical

Arguments

cTableAlias

Specifies the alias of the table for which the exclusive use status is returned. Visual FoxPro generates an error message if you specify a table alias that doesn't exist.

nWorkArea

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.

cDatabaseName

Specifies the name of the database for which the exclusive use status is returned.

nType

Specifies whether the exclusive status is returned for a table or a database. The following table lists the values for nType and the corresponding status returned.

nType Exclusive Status Returned
1 Table
2 Database

To determine the exclusive status for a database, you must include nType with a value of 2.

Remarks

ISEXCLUSIVE( ) returns a value for the table open in the currently selected work area if you omit the optional cTableAlias, nWorkArea, 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.