DbSelectArea Function | |
Change the current work area.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.21
Syntax FUNCTION DbSelectArea(
uArea
) AS LOGIC CLIPPER
[ClipperCallingConventionAttribute(new string[] { ... })]
public static bool DbSelectArea(
Usual uArea = default
)
Request Example
View SourceParameters
- uArea (Optional)
- Type: Usual
A number that specifies the work area to be selected. or the alias of the work area to be selected.
Return Value
Type:
Logic
TRUE if successful; otherwise, FALSE.
Remarks
DBSelectArea() causes the specified work area to become the current work area.
All subsequent database operations will apply to this work area unless another work area is explicitly specified for an operation.
DBSelectArea() performs the same function as the SELECT command.
For more information, refer to the SELECT command.
Tip |
---|
Selecting 0: Selecting work area 0 causes the lowest numbered unoccupied work area to become the current work area.
Aliased expressions: The alias operator (->) can temporarily select a work area while an expression is evaluated and automatically restore the previously selected work area afterward.
|
Examples
The following example selects a work area via the alias name:
1cLast := "Winston"
2DBUseArea(TRUE, "DBFNTX", "sales", "Sales", TRUE)
3Sales->DBSetIndex("salefnam")
4Sales->DBSetIndex("salelnam")
5DBUseArea(TRUE, "DBFNTX", "colls", "Colls", TRUE)
6Colls->DBSetIndex("collfnam")
7Colls->DBSetIndex("colllnam")
8DBSelectArea("Sales")
9DBSelectArea("Colls")
See Also