BLOBRootLock Function | |
Obtain a lock on the root area of a BLOB file.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.21
Syntax Remarks
Use BLOBRootLock() when accessing the database file in shared mode to obtain a lock on the root area of a BLOB file for reading from or writing to the root area.
By default, this function operates on the currently selected work area.
It can be made to operate on an unselected work area by specifying
it within an aliased expression
Examples
This example illustrates how to properly lock and unlock the root area of a BLOB file for a database file opened in shared mode.
1FUNCTION GetSettings()
2 LOCAL aCustSettings AS ARRAY
3
4 USE customer NEW SHARED INHERIT FROM {"DBFBLOB"}
5 IF BLOBRootLock()
6 aCustSettings := BLOBRootGet()
7 BLOBRootUnLock()
8 ELSE
9 Alert("Could not obtain root lock of Customer;
10 file")
11 ENDIF
12 CLOSE
13 RETURN aCustSettings
See Also