SQL_GET_LOB_LENGTH_UC¶

Applies to: ORAFlex SQLFlex MYSQLFlex PGFlex DB2Flex

This command is used to get the length of a specified LOB field. It is useful, for example, in determining the number of iterations to perform while reading from a LOB field using chunking.

Syntax

SQL_GET_LOB_LENGTH_UC {FileName.FieldName} to {variable}

Parameter

Description

FileName

The name of the file containing the LOB field

FieldName

The name of the specified LOB field

variable

The variable to hold the length of the 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