| xHarbour Reference Documentation > Function Reference |
![]() |
![]() |
![]() |
Determines if a database file is open in a work area.
Used() --> lIsUsed
The function returns .T. (true) if a database file is open in a specified work area, otherwise .F. (false) is returned.
Used() determines if a database file is open in a work area, i.e. if a work area is "used". If the function is called without the alias operator, it operates in the current work area. The current work area is selected with function DbSelectArea().
| See also: | Alias(), DbSelectArea(), DbUseArea(), SELECT, Select(), USE |
| Category: | Database functions , Environment functions |
| Source: | rdd\dbcmd.c |
| LIB: | xhb.lib |
| DLL: | xhbdll.dll |
// The shows how to query the Used status of work areas
PROCEDURE Main
? Select() // result: 1
? Used() // result: .F.
USE Customer ALIAS Cust NEW
? Select() // result: 1
? Used() // result: .T.
DbSelectArea( 2 )
? Select() // result: 2
? Used() // result: .F.
? (1)->(Used()) // result: .T.
? (2)->(Used()) // result: .F.
? Cust->(Used()) // result: .T.
CLOSE Cust
RETURN
http://www.xHarbour.com