xHarbour Reference Documentation > Function Reference |
Retrieves the work area number by alias name.
Select( [<cAlias>] ) --> nWorkArea
The function returns an integer numeric value representing the work area number of the work area having the alias name <cAlias>. If this alias does not exist, the return value is zero. When <cAlias> is omitted, the function returns the work area number of the current work area.
Select() retrieves the work area number by its alias name. This is the opposite of function Alias(), which retrieves the alias name of a work area by its number.
Work areas are numbered from 1 to 65535. They hold open database and index files and make them accesible to database functions and commands.
See also: | Alias(), DbSelectArea(), FieldGet(), SELECT, USE, Used() |
Category: | Database functions |
Source: | rdd\dbcmd.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example opens two databases in two different work areas // shows their work area numbers. PROCEDURE Main USE Customer ALIAS Cust DbSelectArea(10) USE Invoice ALIAS Inv ? Select() // result: 10 ? Select( "Cust" ) // result: 1 ? Select( "Inv" ) // result: 10 CLOSE ALL RETURN
http://www.xHarbour.com