DbSelect Function | |
Select a new work area and retrieve the current work area.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.21
Syntax FUNCTION DbSelect(
nNew
) AS DWORD CLIPPER
[ClipperCallingConventionAttribute(new string[] { ... })]
public static uint DbSelect(
Usual nNew = default
)
Request Example
View SourceParameters
- nNew (Optional)
- Type: Usual
The work area number for the new work area.
Return Value
Type:
DWord
The work area number for the old work area.
Remarks
DBSelect() allows you to change the current work area and also retrieve the number of the current work area.
This is useful in a group programming project or when writing black-box general routines: each time a module changes the environment by selecting a new work area, you must save and restore the old environment.
Examples
The following example sets a new work area and stores the number of the current work area:
1nOld := 0
2nNew : = 10
3nOld := DBSelect(nNew)
4...
5
6DBSelect(nOld)
7? "New work area :", Select()
8? "Workarea selected before :", nOld
See Also