Neoview JDBC Type 4 Driver Programmer's Reference (R2.2, R2.3, R2.4, R2.5)
1. Invoke the following command where Neoview Script is installed on the workstation.
For the Windows workstation:
> hpnvs.cmd
For the Linux or UNIX workstation:
> hpnvs.sh
2. Type this special command in Neoview Script to enable creating tables that have LOB
columns:
CONTROL QUERY DEFAULT JDBC_PROCESS 'TRUE';
3. Type the CREATE TABLE statement; for example, you might use the following simple form
of the statement:
CREATE TABLE table1 (c1 INTEGER NOT NULL, c2 CLOB, c3 BLOB, PRIMARY KEY(c1));
table1 The name of the base table.
NOTE: If different LOB tables are used for storing BLOB or CLOB data,
the base table name for a table with BLOB or CLOB columns must be unique
across all catalogs and schemas. Otherwise, the driver will give incorrect
data to the application in cases where the LOB tables used get erroneously
switched or changed.
c1 Column 1, defined as the INTEGER data type with the NOT NULL
constraint.
c2 Column 2, defined as the CLOB data type.
c3 Column 3, defined as the BLOB data type.
PRIMARY KEY Specifies c1 as the primary key.
Use this example as the archetype for creating base tables. For information about valid names
for tables (table1) and columns (c1, c2, and c3) and for information about the CREATE TABLE
statement, see the Neoview SQL Reference Manual.
Using JDBC Programs To Create Base Tables that Have LOB Columns
When using a JDBC Program to create base tables that have LOB columns, put the CREATE
TABLE statements in the program as you would any other SQL statement. For an example of
the CREATE TABLE statement, see the discussion “Using Neoview Script To Create Base Tables
that Have LOB Columns” (page 59).
Managing LOB Data by Using the Lob Admin Utility
Use the Lob Admin Utility (T4LobAdmin) for the following tasks:
• Creating the LOB table (a table that holds LOB data).
• Creating the SQL triggers for the LOB columns in the base tables to ensure that orphan LOB
data does not occur in a LOB table.
NOTE: If you are creating triggers, ensure that the base table that contains the CLOB column
or BLOB column has already been created.
Information about using the Lob Admin Utility is described under these topics.
• “Running the Lob Admin Utility” (page 61)
• “Help Listing From the Type 4 Lob Admin Utility” (page 61)
• “Using SQL Triggers to Delete LOB Data” (page 62)
60 Managing the SQL Tables for BLOB and CLOB Data