JDBC Driver for SQL/MX Programmer's Reference
Updating CLOB Data
You can make updates to CLOB data by using the methods in the Clob interface or by using
the updateClob method of the ResultSet interface. The JDBC/MX driver makes changes
directly to the CLOB data. Therefore, the JDBC/MX driver returns false to the
locatorsUpdateCopy method of the DatabaseMetaData interface. Applications do
not need to issue a separate update statement to update the CLOB data.
Make updates to CLOB data in the following ways:
Updating Clob Objects with the updateClob Method●
Replacing Clob Objects●
Updating Clob Objects with the updateClob
Method
Unlike some LOB support implementations, the JDBC/MX driver updates the CLOB data
directly in the database. So, when the Clob object is the same in the updateClob method as
the Clob object obtained using getClob, the updateRow method of the ResultSet
interface does nothing with the Clob object.
When the Clob objects differ, the Clob object in the updateClob method behaves as if the
setClob method was issued. See Inserting a Clob Object with the setClob Method.
Replacing Clob Objects
You can replace Clob objects in the following ways:
Use the EMPTY_CLOB() function to replace the Clob object with the empty Clob
object, then insert new data as described under Inserting CLOB Columns by Using the
Clob Interface.
●
Use the PreparedStatement.setAsciiStream() or
setCharacterStream() method to replace the existing Clob object with new
CLOB data.
●
Use the setClob or updateClob method to replace the existing CLOB objects as
explained earlier under Inserting a Clob Object with the setClob Method and Updating
Clob Objects with the updateClob Method.
●