JDBC Type 4 Driver Programmer's Reference for SQL/MX Release 3.2 (H06.25+, J06.14+)
The Unicode LOB table structure for ASCII data is:
table_name CHAR(128),
data_locator LARGEINT,
chunk_no INTEGER,
lob_data VARCHAR(1955) CHARACTER SET UCS2
Setting Properties for the LOB Table
• “Specifying the LOB Table” (page 55)
• “Reserving Data Locators” (page 55)
Before running the JDBC application that uses BLOB and CLOB data through the JDBC API, the
database administrator must create the LOB tables. For information on creating LOB tables, see
Managing LOB Data with the Lob Admin Utility.
The JDBC applications that access BLOB or CLOB data must specify the associated LOB table
names and, optionally, configure the reserveDataLocators property.
Specifying the LOB Table
At run time, a user JDBC application notifies the Type 4 driver of the name or names of the LOB
tables associated with the CLOB or BLOB columns of the base tables being accessed by the
application. One LOB table or separate tables can be used for BLOB and CLOB data. The JDBC
application specifies a LOB table name either through a system parameter or through a Java
Property object by using one of the following properties, depending on the LOB column type:
Property nameLOB Column Type
blobTableNameBLOB
clobTableNameCLOB
For more information about using these properties, see “LOB Table Name Properties” (page 43).
Reserving Data Locators
A data locator is the reference pointer value (SQL LARGEINT data type) that is substituted for the
BLOB or CLOB column in the base table definition. Each object stored into the LOB table is assigned
a unique data locator value. Because the LOB table is a shared resource among all accessors that
use the particular LOB table, reserving data locators reduces contention for getting the next value.
The default setting is 100 reserved data locators; therefore, each JVM instance can insert 100
large objects (not chunks) before needing a new allocation.
Specify the number of data locators (n) to reserve for your application by using the Type 4 driver
property t4sqlmx.reserveDataLocators. For information about specifying this property, see
“reserveDataLocators” (page 47).
Storing CLOB Data
• “Inserting CLOB Columns by Using the Clob Interface” (page 56)
• “Writing ASCII or MBCS Data to a CLOB Column” (page 56)
• “Inserting CLOB Data by Using the PreparedStatement Interface” (page 56)
• “Inserting a Clob Object by Using the setClob Method” (page 57)
• “Inserting a CLOB column with Unicode data using a Reader” (page 57)
• “Writing Unicode data to a CLOB column” (page 57)
Setting Properties for the LOB Table 55










