DBUSED( ) Function Example

The following example opens the TESTDATA database, and then uses DBUSED( ) to determine if the TESTDATA database and a database named TEST are open.

CLOSE DATABASES
OPEN DATABASE (HOME(2) + 'Data\testdata')

CLEAR
? 'Testdata database open? '
?? DBUSED('testdata')     && Displays .T.
? 'Test database open? '
?? DBUSED('test')     && Displays .F.