VoDbCloseArea Function | ![X#](../icons/logo100.jpg) |
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
public static bool VoDbCloseArea()
Request Example
View SourceReturn 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 |
---|
VoDbCloseArea() and CoreDb.CloseArea() are aliases |
Tip |
---|
VoDbCloseArea() is an alias for CoreDbCloseArea() |
Examples
The following example closes a file via an alias reference:
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