JavaScript Editor js editor     Web development 



Main Page

Determines if an alias is in use or a table is open in a specific work area.

USED([nWorkArea | cTableAlias])

Parameters

nWorkArea| cTableAlias


Specifies a table's work area or alias. USED(В ) returns a logical true (.T.) if a table is opened in the work area you specify with nWorkArea; otherwise a logical false (.F.) is returned. USED(В ) returns a logical true (.T.) if an alias is in use with the alias you specify with cTableAlias; otherwise false (.F.) is returned. If you omit nWorkArea and cTableAlias, USED(В ) returns a logical true (.T.) if a table is open in the currently selected work; otherwise false (.F.) is returned.

Return Value

Logical

Remarks

USED(В ) can determine if an alias is in use or if a table is open in a specific work area.

Example

В Copy Code
CLOSE DATABASES
OPEN DATABASE (HOME(2) + 'Data\testdata')
SELECT A
USE customer  && Opens Customer table
SELECT B
USE orders  && Opens Orders table
SELECT C
USE employee  && Opens Employee table
? USED('A')  && Displays .T.
? USED('B')  && Displays .T.
? USED(4)  && Displays .F.

See Also



JavaScript Editor js editor     Web development