Click or drag to resize

VoDbSelect Function (UInt32, Usual)

Select a new work area and retrieve the current work area.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.10
Syntax
 FUNCTION VoDbSelect(
	wNew AS DWORD,
	wOld REF USUAL
) AS LOGIC
View Source

Parameters

wNew
Type: UInt32
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: Boolean
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#
LOCAL wOld AS DWORD
VODBSelect(10, @wOld)
        // Process the work area
VODBSelect(wOld, @wOld)
See Also