| xHarbour Reference Documentation > Function Reference |
![]() |
![]() |
![]() |
Returns the alias name of a work area.
Alias( [<nWorkArea>] ) --> cAlias
The function returns the alias name of the work area specified with <nWorkArea>. If no parameter is passed, the alias name of the current work area is returned. When no database is open in the work area, the return value is a null string ("").
The alias name of a work area exists while a database is open in it. Alias names are used to address work areas via a symbolic name and are specified with the USE command or the DbUseArea() function. Alias names are always created in upper case letters.
| See also: | DbInfo(), DbUseArea(), OrdName(), OrdNumber(), SELECT, Select(), USE |
| Category: | Database functions |
| Source: | rdd\dbcmd.c |
| LIB: | xhb.lib |
| DLL: | xhbdll.dll |
// The example demonstrates usage of functions Alias() and Select(),
// both ofwhich are used to address work areas.
PROCEDURE Main
USE Customer NEW ALIAS Cust
USE Invoice NEW ALIAS Inv
? Alias() // result: INV
? Select() // result: 2
? Alias(1) // result: CUST
? Select( "CUST" ) // result: 1
CLOSE ALL
RETURN
http://www.xHarbour.com