RetrieveLOBValue()


" "

short RetrieveLOBValue(short DataType, VARIANT Locator,  VARIANT* Value)

Description

This function retrieves LOB data (BLOB, CLOB and DBCLOB) using its corresponding LOB locator value. It has to be in the Unit of Work. After the transaction has been committed or roll backed, the LOB locator becomes invalid.

Parameters

Name Description
DataType The data types for the large objects, binary large objects (BLOBs), single-byte character large objects (CLOBs), and double-byte character large objects (DBCLOBs). Valid balues for DataType are as follows:


916 (RSDT_BLOBFILEREF) DB2 data type for storing BLOB data in a file and refers to that BLOB using its filename.
920 (RSDT_CLOBFILEREF) See 916 (RSDT_BLOBFILEREF) in respect to CLOB.
924 (RSDT_DBCLOBFILEREF) See 916 (RSDT_BLOBFILEREF) in respect to DBCLOB.
904 (RSDT_ROWID) DB2 data type only available on the iSeries platform. This is called Row Identifier. The DB2 database server generates the value of the Row Identifier and it is granted to be unique. For a LOB table it can have only one ROWID column.
960 (RSDT_BLOBLOCATOR) DB2 data type for storing a handle of a LOB data stored and managed at the server. An application can use this handle to manipulate it by getting its length, searching it and retrieving its content in portion or in full. The LOB data is stored at the server side and only its handle is returned to the application.
964 (RSDT_CLOBLOCATOR) See 960 (RSDT_BLOBLOCATOR)
968 (RSDT_DBCLOBLOCATOR) See 960 (RSDT_BLOBLOCATOR)
972 (RSDT_RSLSETLOCATOR) DB2 data type for storing a handle for a result set returned by a CALL statement. Application can use it to identify the result set.


Locator Locators are useful to identify and manipulate a large object value at the database server and for extracting pieces of the LOB value.
Value A pointer to a variant in which the results will be stored.

Return Value

Return value will be zero if successful or non=zero if unsucessful. If the return value is non=zero, you can call GetLastErrorString(), GetLastErrorType(), GetLastSQLCode(), GetLastSQLError(), or GetLastSQLState() to get additional error information.