Click or drag to resize

VoDbCloseArea Function

X#
Close all files in a work area.

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

Return Value

Type: Logic
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 LastRddError property in the runtime state. 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#
 1LOCAL rddList       AS _RDDLIST
 2...
 3aRdds := {"CAVODBF", "DBFNTX"}
 4n       := ALen(aRdds)
 5rddList := MemAlloc( (_SizeOf(DWORD)) + (n * _SizeOf(SYMBOL)) )
 6rddList.uiRddCount := n
 7FOR i := 1 TO n
 8    rddList.atomRddName[i] := SysAddAtomUpperA(aRdds[i])
 9NEXT
10cLast := "Winston"
11VODBUseArea(TRUE, rddList, "sales", "sales", TRUE, FALSE)
12VODBOrdListAdd("Last", NIL)
13MemFree(rddList)
14IF (VODBSeek(cLast))
15    IF Deleted() .AND. RLock()
16        VODBRecall()
17        ? "Record deleted: ", Deleted()
18    ENDIF
19ELSE
20    ? "Not found"
21ENDIF
22VODBCloseArea()
See Also