SQL_SET_LOB¶
Applies to: ORAFlex SQLFlex MYSQLFlex PGFlex DB2Flex
This command replaces whatever is currently in a LOB Field with the data passed. It writes to a client side buffer. It can be used to Write an arbitrary amount of data into a LOB. If passed an empty String, it will remove all the contents of the LOB. If you wish to Set a LOB back to NULL, please use the SQL_SET_LOB_NULL command. NOTE: Unlike the previous call LOB_WRITE, this call does not perform the Save. This must be done separately.
Syntax
SQL_SET_LOB {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 use to set the field’s value |
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
SQL_LOB_TRUNCATE