Click or drag to resize

Used Function (Usual)

Determine whether a database file is open.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.4a
Syntax
 FUNCTION Used(
	uArea AS USUAL
) AS LOGIC
View Source

Parameters

uArea
Type: Usual
Specifies the work area name or number for a table from which the value must be retrieved.

Return Value

Type: Boolean
TRUE if there is a database file in use; otherwise, FALSE.
Remarks
Used() determines whether there is a database file in use in a work area. By default, this function operates on the currently selected work area.   It can be made to operate on an unselected work area by specifying it within an aliased expression or by calling the that accepts a workarea parameter (a workarea number or alias ).
Examples
This example determines whether a database file is in use in the current work area:
X#
1USE customer NEW
2QOut(Used())            // Result: TRUE
3CLOSE
4QOut(Used())            // Result: FALSE
See Also