Start changeAS400JDBCClob interface

You can use a AS400JDBCClob object to access character large objects (CLOBs), such as large documents.

The key difference between the AS400JDBCClob class and the AS400JDBCClobLocator class is where the blob is stored. With the AS400JDBCClob class, the blob is stored in the database, which inflates the size of the database file. The AS400JDBCClobLocator class stores a locator (think of it as a pointer) in the database file that points to where the blob is located.

With the AS400JDBCClob class, the lob threshold property can be used. This property specifies the maximum large object (LOB) size (in kilobytes) that can be retrieved as part of a result set. LOBs that are larger than this threshold are retrieved in pieces using extra communication to the server. Larger LOB thresholds reduce the frequency of communication to the server, but they download more LOB data, even if it is not used. Smaller lob thresholds may increase frequency of communication to the server, but they only download LOB data as it is needed. See JDBC properties for information on additional properties that are available.

Using the AS400JDBCClob interface, you can do the following:

The following example shows how to use the AS400JDBCClob interface:

Clob clob = rs.getClob (1);
int length = clob.getLength ();
String s = clob.getSubString (0, (int) length);

AS400JDBCClobLocator interface

You can use a AS400JDBCClobLocator object to access character large objects (CLOBs).

Using the AS400JDBCClobLocator interface, you can do the following:


[ Legal | AS/400 Glossary ]