Neoview JDBC Type 4 Driver Programmer's Reference (R2.2, R2.3, R2.4, R2.5)

url Property.....................................................................................................................................50
url Property Considerations.......................................................................................................50
user Property...................................................................................................................................50
5 Working with BLOB and CLOB Data.........................................................................51
Architecture for LOB Support..............................................................................................................51
Setting Properties for the LOB Table....................................................................................................52
Specifying the LOB Table.................................................................................................................52
Reserving Data Locators..................................................................................................................52
Storing CLOB Data...............................................................................................................................52
Inserting CLOB Columns by Using the Clob Interface...................................................................53
Writing ASCII or MBCS Data to a CLOB Column..........................................................................53
ASCII Data..................................................................................................................................53
Inserting CLOB Data by Using the PreparedStatement Interface...................................................53
ASCII Data..................................................................................................................................54
Inserting a Clob Object by Using the setClob Method....................................................................54
Reading CLOB Data..............................................................................................................................54
Reading ASCII Data from a CLOB Column....................................................................................54
Updating CLOB Data............................................................................................................................54
Updating Clob Objects with the updateClob Method....................................................................55
Replacing Clob Objects....................................................................................................................55
Deleting CLOB Data.............................................................................................................................55
Storing BLOB Data................................................................................................................................55
Inserting a BLOB Column by Using the Blob Interface...................................................................55
Writing Binary Data to a BLOB Column.........................................................................................56
Inserting a BLOB Column by Using the PreparedStatement Interface...........................................56
Inserting a Blob Object by Using the setBlob Method.....................................................................56
Reading Binary Data from a BLOB Column.........................................................................................57
Updating BLOB Data............................................................................................................................57
Updating Blob Objects by Using the updateBlob Method..............................................................57
Replacing Blob Objects....................................................................................................................57
Deleting BLOB Data..............................................................................................................................58
NULL and Empty BLOB or Empty CLOB Value..................................................................................58
Transactions Involving Blob and Clob Access......................................................................................58
Access Considerations for Clob and Blob Objects................................................................................58
6 Managing the SQL Tables for BLOB and CLOB Data.............................................59
Before You Begin Managing LOB Data.................................................................................................59
Creating Base Tables that Have LOB Columns....................................................................................59
Data Types for LOB Columns..........................................................................................................59
Installing HP Neoview Script..........................................................................................................59
Using Neoview Script To Create Base Tables that Have LOB Columns.........................................59
Using JDBC Programs To Create Base Tables that Have LOB Columns.........................................60
Managing LOB Data by Using the Lob Admin Utility.........................................................................60
Running the Lob Admin Utility......................................................................................................61
java_options................................................................................................................................61
program_options........................................................................................................................61
table_name.................................................................................................................................61
Help Listing From the Type 4 Lob Admin Utility...........................................................................61
Creating LOB Tables........................................................................................................................62
Using SQL Triggers to Delete LOB Data...............................................................................................62
Limitations of LOB Data (CLOB and BLOB Data Types).....................................................................63
Table of Contents 5