ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzahh_5.4.0.1/jdbcenhance.htm

123 lines
7.5 KiB
HTML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="reference" />
<meta name="DC.Title" content="Enhancements to JDBC support for Version 5 Release 3" />
<meta name="abstract" content="Several JDBC functions were enhanced for i5/OS Version 5 Release 3." />
<meta name="description" content="Several JDBC functions were enhanced for i5/OS Version 5 Release 3." />
<meta name="DC.Relation" scheme="URI" content="jdbc2.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="jdbcenhance" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>Enhancements to JDBC support for Version 5 Release 3</title>
</head>
<body id="jdbcenhance"><a name="jdbcenhance"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Enhancements to JDBC support for Version 5 Release 3</h1>
<div><p>Several JDBC functions were enhanced for i5/OS™ Version 5 Release 3.</p>
<div class="section"><p>Enhanced JDBC functions for i5/OS Version 5 Release 3 include:</p>
<ul><li> <a href="#jdbcenhance__utfsupport">UTF-8 and UTF-16 support</a></li>
<li> <a href="#jdbcenhance__binsupport">Binary and Varbinary support</a></li>
<li> <a href="#jdbcenhance__decprecsupport">Increased Decimal Precision
support</a></li>
<li> <a href="#jdbcenhance__lobsupport">2 GB large object support:</a></li>
<li> <a href="#jdbcenhance__insensitivecursupport">Insensitive cursor support</a></li>
<li> <a href="#jdbcenhance__matqtablesupport">Materialized Query Table support</a></li>
</ul>
<p>For information about enhanced JDBC functions for previous releases,
see <a href="rzahhjdbcenhancev5r2.htm#rzahhjdbcenhancev5r2">V5R2 enhancements
to IBM<sup>®</sup> Toolbox
for Java™ JDBC
support</a>.</p>
</div>
<div class="section" id="jdbcenhance__utfsupport"><a name="jdbcenhance__utfsupport"><!-- --></a><dl><dt class="dlterm"><strong>UTF-8 and UTF-16 support</strong></dt>
<dd>UTF-8 data is stored in a character field with a CCSID of 1208. A UTF-8
character is a variable number of bytes (one, two, three, or four) for a non-combining
character, and any number of bytes for a combining character. The length specified
for a character field is the maximum number of bytes the field can contain.
You can tag the following data types with a UTF-8 1208 CCSID: <ul><li>Fixed length character (CHAR)</li>
<li>Variable length character (VARCHAR)</li>
<li> Character LOB (CLOB)</li>
</ul>
<div class="p">UTF-16 data is stored in a graphic field with a CCSID of 1200. A UTF-16
character can be either two or four bytes (that is, Surrogate) in length for
a non-combining character and any number of bytes for a combining character.
The length specified for a graphic data field is the maximum number of two
bytes characters the field can contain. You can tag the following data types
with a UTF-16 1200 CCSID:<ul><li>Fixed length graphic (GRAPHIC)</li>
<li>Variable length graphic (VARGRAPHIC)</li>
<li>Double-byte character LOB (DBCLOB)</li>
</ul>
</div>
</dd>
</dl>
</div>
<div class="section" id="jdbcenhance__binsupport"><a name="jdbcenhance__binsupport"><!-- --></a><dl><dt class="dlterm"><strong>Binary and Varbinary support</strong></dt>
<dd>The BINARY and VARBINARY data types are similar to the CHAR and VARCHAR
data types, but contain binary data rather than character data. BINARY fields
have a fixed length. VARBINARY fields are of varying length. The BINARY and
VARBINARY data types have the following characteristics: <ul><li>The coded character set identifier (CCSID) for binary types is 65535</li>
<li>In assignments and comparisons, binary data types are compatible only
with other binary data types (BINARY, VARBINARY, and BLOB)</li>
<li>The pad character for binary data types is x'00' instead of the blank
character </li>
<li>In situations requiring trailing characters to be stripped to prevent
truncation errors, x'00' characters are stripped instead of trailing blanks</li>
<li>When comparing binary data types, for two fields to be equal both the
data and the lengths must be the same. Trailing zeros are not ignored in comparisons</li>
<li>When comparing binary data types, if two fields have different lengths,
the shorter field is considered less than the longer field if the fields are
the same up to the length of the shorter field</li>
</ul>
</dd>
</dl>
</div>
<div class="section" id="jdbcenhance__decprecsupport"><a name="jdbcenhance__decprecsupport"><!-- --></a><dl><dt class="dlterm"><strong>Increased Decimal Precision support</strong></dt>
<dd>Decimal precision now supports up to 63 digits. Three properties were
added, "minimum divide scale", "maximum precision", and "maximum scale" and
six methods added to AS400JDBCDataSource, setMinimumDivideScale(int divideScale),
getMinimumDivideScale(), setMaximumPrecision(int precision), getMaximumPrecision(),
setMaximumScale(int scale), and getMaximumScale(). Minimum divide scale specifies
the minimum scale value for the result of decimal division and is set to any
number between 0 and 9. Maximum precision specifies the maximum decimal precision
the database uses and is set to either 31 or 63. Maximum scale specifies the
maximum scale the database uses and is set to any number between 0 and 63.</dd>
</dl>
</div>
<div class="section" id="jdbcenhance__lobsupport"><a name="jdbcenhance__lobsupport"><!-- --></a><dl><dt class="dlterm"><strong>2 GB large object (LOB) support</strong></dt>
<dd>Enhancements for IBM Toolbox for Java JDBC now allow the use of up to 2 GB
LOBs support.</dd>
</dl>
</div>
<div class="section" id="jdbcenhance__insensitivecursupport"><a name="jdbcenhance__insensitivecursupport"><!-- --></a><dl><dt class="dlterm"><strong>Insensitive cursor support</strong></dt>
<dd> Cursor support now supports insensitive cursors. When using a ResultSet
with TYPE_SCROLL_INSENSITIVE, an insensitive cursor is used. The ResultSet
does not show changes to the underlying database while it is open. </dd>
</dl>
</div>
<div class="section" id="jdbcenhance__matqtablesupport"><a name="jdbcenhance__matqtablesupport"><!-- --></a><dl><dt class="dlterm"><strong>Materialized Query Table support</strong></dt>
<dd>Returns "MATERIALIZED QUERY TABLE" as the TABLE_TYPE in a call to DatabaseMetaData.getTables().</dd>
</dl>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="jdbc2.htm" title="JDBC is an application programming interface (API) included in the Java platform that enables Java programs to connect to a wide range of databases.">JDBC</a></div>
</div>
</div>
</body>
</html>