Get BLOB Data Method
This Get BLOB Data method reads data from a binary large object. It returns the data from the BLOB.
Format A
Blob.get(blobVar, offset, dataType)
You use format A for byte, integer, or float data.
Format B
Blob.get(blobVar, offset, bufferLen)
You use format B for byte data.
Format C
Blob.get(blobVar, offset, blobDescriptor dataDefinition)
You use format C for object data.
Arguments
The following table describes the arguments for the Get BLOB Data method.
Argument | Description |
---|---|
blobVar |
The name of the binary large object that this method manipulates. |
offset |
The position in the BLOB that Siebel CRM uses to read the data. |
dataType |
An integer value that identifies the data format in the BLOB. The dataType argument must include one of the values you must use with a BLOB descriptor. For more information, see Values You Must Use with a blobDescriptor. |
bufferLen |
An integer that specifies the size of the buffer in bytes. |
blobDescriptor dataDefinition |
A blobDescriptor object that identifies the data format in the BLOB. |
Example
The following example describes how to get values from a BLOB object:
function GetBlobVal()
{
var a, b, c;
a = "";
b = 1234;
c = 12345678;
// Call a function to build the Blob
var blob = BuildBlob(a, b, c);
TheApplication().TraceOn("c:\\temp\\blob.txt","Allocation","All");
// Get the values from the blob object
// The first variable is string
var resultA = Blob.get(blob,0,1000);
// The second variable is an integer
var resultB = Blob.get(blob,1000,UWORD16);
// The third variable has a type of float
var resultC = Blob.get(blob,1002,FLOAT64);
TheApplication().Trace(resultA);
TheApplication().Trace(resultB);
TheApplication().Trace(resultC);
}
function BuildBlob(a, b, c)
{
var blob;
a = "Blob Test Value From Function";
var offset = Blob.put(blob, 0, a, 1000);
offset = Blob.put(blob, offset, b*2, UWORD16);
Blob.put(blob, offset, c*2, FLOAT64);
return blob;
}