Siebel eScript Language Reference > Siebel eScript Commands > BLOB Objects >
Blob.get() Method
This method reads data from a binary large object. Syntax A
Blob.get(blobVar, offset, dataType)
Syntax B
Blob.get(blobVar, offset, bufferLen)
Syntax C
Blob.get(blobVar, offset, blobDescriptor dataDefinition)
|
|
blobVar |
The name of the binary large object to use |
offset |
The position in the BLOB from which to read the data |
dataType |
An integer value indicating the format of the data in the BLOB |
blobDescriptor dataDefinition |
A blobDescriptor object indicating the form of the data in the BLOB |
Returns
The data read from the BLOB. This method reads data from a specified location of a binary large object (BLOB), and is the companion function to Blob.put(). Use Syntax A for byte, integer, and float data. Use Syntax B for byte[] data. Use Syntax C for object data. dataType must have one of the values listed for blobDescriptors in blobDescriptor Objects. Example
This example shows 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; }
See Also
blobDescriptor Objects Blob.put() Method
|