Share via


DBUSED( ) Function

Returns true (.T.) if the specified database is open.

DBUSED(cDatabaseName)

Return Values

Logical

Parameters

  • cDatabaseName
    Specifies the name of the database for which DBUSED( ) returns a logical value indicating whether or not the database is open.

Remarks

DBUSED( ) returns true (.T.) if the specified database is open; otherwise, it returns false (.F.).

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.

See Also

CLOSE DATABASES | CREATE DATABASE | OPEN DATABASE