SQL_ADD_LOB_CHUNK¶

Applies to: ORAFlex SQLFlex MYSQLFlex PGFlex DB2Flex

This command is used to add additional chunks to the buffer before saving the record. After SQL_SET_LOB has been called SQL_ADD_LOB_CHUNK can be called as many times as needed to add additional chunks of data before a save. It can also be called independent of SQL_SET_LOB to append data to an existing LOB column. NOTE: Unlike the previous call LOB_APPEND, this call does not perform the save. This must be done separately.

Syntax

SQL_ADD_LOB_CHUNK {FileName.FieldName} to {variable}

Parameter

Description

FileName

The name of the file containing the LOB field

FieldName

The name of the LOB field being set

variable

The variable to add as the LOB chunk

Example

Set_Argument_Size 262144
String sLine

Clear Customer
   Move iID to Customer.ID
Find Eq Customer by Index.1
If (Found) Begin
   Direct_Input "C:\bigFile.xml"
   Reread Customer
      SQL_SET_LOB Customer.Comments to ""
      Read_Block sLine 262144
      SQL_SET_LOB Customer.Comments to sLine
      While (not(SeqEof))
         Read_Block sLine 262144
         SQL_ADD_LOB_CHUNK Customer.Comments to sLine
      Loop
   Saverecord Customer
   Unlock
   Close_Input
End