Click or drag to resize

DbUsed Function

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

Namespace:  XSharp.VFP
Assembly:  XSharp.VFP (in XSharp.VFP.dll) Version: 2.19
Syntax
 FUNCTION DbUsed(
	cDatabaseName AS STRING
) AS LOGIC
Request Example View Source

Parameters

cDatabaseName
Type: String
Specifies the name of the database for which DbUsed( ) returns a logical value indicating whether or not the database is open.

Return Value

Type: Logic
Logical
Remarks
DbUsed( ) returns true (.T.) if the specified database is open; otherwise, it returns false (.F.).
Examples
X#
1Close Databases
2Open Database (HOME(2) + 'Data\testdata')
3Clear
4? 'Testdata database open? '
5?? DbUsed('testdata')     // Displays .T.
6? 'Test database open? '
7?? DbUsed('test')     // Displays .F.
See Also