Select a new work area and retrieve the current work area.
XSharp.RT (in XSharp.RT.dll) Version: 2.10
Syntax View Source
nNew AS USUAL
) AS DWORD
public static uint DbSelect(
[DefaultParameterValueAttribute(0, 1)] Usual nNew
- Type: Usual
The work area number for the new work area.
The work area number for the old work area.
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.
The following example sets a new work area and stores the number of the current work area:
nOld := 0
nNew : = 10
nOld := DBSelect(nNew)
// Restore the old work area
? "New work area :", Select()
? "Workarea selected before :", nOld