Click or drag to resize

VoDbSelect Function (DWord, Usual)

X#
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 VoDbSelect(
	wNew AS DWORD,
	wOld OUT USUAL
) AS LOGIC
Request Example View Source

Parameters

wNew
Type: DWord
The work area number for the new work area.
wOld
Type: Usual
A variable that is passed by reference and will contain the number of the current work area.

Return Value

Type: Logic
TRUE if successful; otherwise, FALSE.
Remarks
VODBSelect() is like DBSelect() but is strongly typed.
This function, however, does not call the error handler and will not, therefore, produce a runtime error message or create an error object if it fails. Thus, it may be important to check the return value to determine if the function succeeded.
The global structure, StrucErrInfo, will contain needed information regarding any error that occurs. See DBSelect() for more information.
Examples
This example shows how to save and restore the old environment:
X#
1LOCAL wOld AS DWORD
2VODBSelect(10, @wOld)
3    // Process the work area
4VODBSelect(wOld, @wOld)
See Also