Click or drag to resize

VoDbCloseArea Function

Close all files in a work area.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.10
Syntax
 FUNCTION VoDbCloseArea() AS LOGIC
View Source

Return Value

Type: Boolean
TRUE if successful; otherwise, FALSE.
Remarks
VODBCloseArea() is the same as DBCloseArea().  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 DBCloseArea() for more information.
Remarks
This function is like DBCloseArea().

This function, however, does not call the error handler and will therefore not produce a runtime error message or create an error object if it fails.
Therefore it is important to check the return value to determine if the function succeeded.

The LastRddError property in the runtimestate will contain needed information about any error that occurs.
Tip Tip
VoDbCloseArea() and CoreDb.CloseArea() are aliases


Tip Tip
VoDbCloseArea() is an alias for CoreDbCloseArea()
Examples
The following example closes a file via an alias reference:
X#
LOCAL rddList       AS _RDDLIST
...
aRdds := {"CAVODBF", "DBFNTX"}
n       := ALen(aRdds)
rddList := MemAlloc( (_SizeOf(DWORD)) + (n * _SizeOf(SYMBOL)) )
rddList.uiRddCount := n
FOR i := 1 TO n
        rddList.atomRddName[i] := SysAddAtomUpperA(aRdds[i])
NEXT
cLast := "Winston"
VODBUseArea(TRUE, rddList, "sales", "sales", TRUE, FALSE)
VODBOrdListAdd("Last", NIL)
MemFree(rddList)
IF (VODBSeek(cLast))
        IF Deleted() .AND. RLock()
                VODBRecall()
                ? "Record deleted: ", Deleted()
        ENDIF
ELSE
        ? "Not found"
ENDIF
VODBCloseArea()
See Also