SQL_GET_LOB_CHUNK_UC¶
Applies to: ORAFlex SQLFlex MYSQLFlex PGFlex DB2Flex
This command is used for getting a chunk of data from a specified LOB field into a uChar[]. The difference between this command and SQL_GET_LOB is only that the parameters OFFSET and LENGTH are not optional when using this command. You may consider using this command to retrieve small portions of a very large BLOB so as to reduce memory usage.
Syntax
SQL_GET_LOB_CHUNK_UC {FileName.FieldName} TO {variable} OFFSET {offset} LENGTH {length}
Parameter |
Description |
---|---|
FileName |
The name of the file that contains the specified LOB field |
FieldName |
The name of the LOB field |
variable |
The variable to hold the LOB chunk |
offset |
Integer amount to offset when getting the LOB chunk |
length |
Length of chunk to get from the LOB field |
Example
uChar[] ucData
Clear Customer
Move iID to Customer.ID
Find Eq Customer by Index.1
If (Found) Begin
SQL_GET_LOB_LENGTH_UC Customer.Comments to iLength
While (iChunk*iChunkSize < iLength)
SQL_GET_LOB_CHUNK_UC Customer.Comments to ucData OFFSET (iChunk*iChunkSize) LENGTH iChunkSize
// Do something with the LOB data
Increment iChunk
Loop
End
SQL_LOB_TRUNCATE_UC