Click or drag to resize

DbServer.BLOBRootGet Method (Typed)

X#
Retrieve the data from the root area of a BLOB file.

Namespace:  XSharp.VO.SDK
Assembly:  XSharp.VORDDClasses (in XSharp.VORDDClasses.dll) Version: 2.19
Syntax
 VIRTUAL METHOD BLOBRootGet() AS USUAL
Request Example View Source

Return Value

Type: Usual
The data retrieved from the root of the BLOB file. The data type of the return value depends on the actual data stored. Use ValType() or UsualType() to determine the data type. Note that DBServer:BLOBRootGet() returns NIL if the root reference has never been written to with DBServer:BLOBRootPut().
Remarks
DBServer:BLOBRootGet() allows the retrieval of a BLOB from the root of a BLOB file.
Tip Tip
Because the root data does not reference a particular record in the data server, it is not affected by DBServer:RLock(), nor is it subject to the DataServer:ConcurrencyControl settings. Therefore, if the data server is opened in shared mode, you should use DBServer:BLOBRootLock() before calling DBServer:BLOBRootGet().
Examples
This example illustrates how to store information in the root of a BLOB file and how to use locking for a data server opened in shared mode.
X#
 1FUNCTION GetSettings()
 2LOCAL aCustSettings AS ARRAY
 3LOCAL oDBCust AS DBServer
 4// Open a customer file in shared mode
 5oDBCust := Customer{}
 6IF oDBCust:BLOBRootLock()
 7aCustSettings := oDBCust:BLOBRootGet()
 8oDBCust:BLOBRootUnlock()
 9ELSE
10Alert("Could not obtain root lock")
11ENDIF
12oDBCust:Close()
13RETURN aCustSettings
See Also