JDBC Driver for SQL/MX Programmer's Reference
Deleting BLOB Data
To delete BLOB data, the JDBC application uses the SQL DELETE statement to delete the row
in the base table.
When the row containing the BLOB column is deleted by the application, the corresponding
BLOB data is automatically deleted by the delete trigger associated with the base table. For
information about triggers, see Using an SQL/MX Trigger to Delete LOB Data.
See also NULL and Empty BLOB or CLOB Value.
NULL and Empty BLOB or CLOB
Value
The data locator can have a NULL value if the BLOB or CLOB column is omitted in the insert
statement. The JDBC/MX driver returns NULL when the application retrieves the value for
such a column.
When the application uses the EMPTY_BLOB() method or EMPTY_CLOB() method to insert
empty BLOB or CLOB data into the BLOB or CLOB column, JDBC/MX driver returns the Blob
or Clob object with no data.
Transactions Involving Blob and Clob
Access
HP recommends that your JDBC applications control the transactions when the BLOB columns
or CLOB columns are accessed either by using the external transaction or by setting the
connection to manual commit mode.
If executing a prepared statement involving BLOB or CLOB data with autocommit mode
enabled and an external transaction does not exist, the JDBC/MX driver mimics autocommit
mode. This operation ensures that inserts or updates of LOB data are committed only after both
the base table and LOB tables are modified.
In some instances an outputStream or Writer object is returned to the application when
the object can be held for an unknown period of time. Therefore, the following interfaces throw
the exception, Autocommit is on and LOB objects are involved, exception