87 lines
6.6 KiB
HTML
87 lines
6.6 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="AS400JDBCConnection class" />
|
|
<meta name="abstract" content="The AS400JDBCConnection class provides a JDBC connection to a specific DB2 UDB for iSeries database." />
|
|
<meta name="description" content="The AS400JDBCConnection class provides a JDBC connection to a specific DB2 UDB for iSeries database." />
|
|
<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="jdbccon" />
|
|
<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>AS400JDBCConnection class</title>
|
|
</head>
|
|
<body id="jdbccon"><a name="jdbccon"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">AS400JDBCConnection class</h1>
|
|
<div><p>The AS400JDBCConnection class provides a JDBC connection to a specific DB2<sup>®</sup> UDB
|
|
for iSeries™ database. </p>
|
|
<div class="section"><p>Use DriverManager.getConnection() to create new AS400JDBCConnection
|
|
objects. For more information, see <a href="jdbcdrvr.htm#jdbcdrvr">Registering the JDBC driver</a>.</p>
|
|
<p>There
|
|
are many optional properties that can be specified when the connection is
|
|
created. Properties can be specified either as part of the URL or in a java.util.Properties
|
|
object. See <a href="jdbcproperties.htm#jdbcproperties">IBM Toolbox for Java JDBC properties</a> for a
|
|
complete list of properties supported by the AS400JDBCDriver.</p>
|
|
<div class="note"><span class="notetitle">Note:</span> A
|
|
connection may contain at most 9999 open statements.</div>
|
|
<p>AS400JDBCConnection
|
|
includes support for savepoints and statement-level holdability, and limited
|
|
support for returning auto-generated keys. For more information about these
|
|
and other enhancements, see <a href="jdbcenhance.htm#jdbcenhance">Enhancements to JDBC support for Version 5 Release 3</a>.</p>
|
|
<p>To
|
|
use Kerberos tickets, set only the system name (and not the password) on your
|
|
JDBC URL object. The user identity is retrieved through the Java™ Generic
|
|
Security Services (JGSS) framework, so you also do not need to specify a
|
|
user on your JDBC URL. You can set only one means of authentication in an
|
|
AS400JDBCConnection object at a time. Setting the password clears any Kerberos
|
|
ticket or profile token. For more information, see the <a href="as400obj.htm#as400obj">AS400 class</a> and
|
|
<a href="http://java.sun.com/j2se/1.4/docs/guide/security/index.html" target="_blank">J2SDK, v1.4 Security Documentation</a> <img src="www.gif" alt="Link outside information center" />.</p>
|
|
<p>Using the AS400JDBCConnection
|
|
class, you can do the following:</p>
|
|
<ul><li><a href="javadoc/com/ibm/as400/access/AS400JDBCConnection.html#CREATESTATEMENT()">Create a statement</a> (Statement, PreparedStatement, or
|
|
CallableStatement objects)</li>
|
|
<li><a href="javadoc/com/ibm/as400/access/AS400JDBCConnection.html#CREATESTATEMENT(INT, INT)">Create a statement</a> that has a specific result set type
|
|
and concurrency (Statement, PreparedStatement, or CallableStatement objects)</li>
|
|
<li><a href="javadoc/com/ibm/as400/access/AS400JDBCConnection.html#COMMIT()">Commit</a> and <a href="javadoc/com/ibm/as400/access/AS400JDBCConnection.html#ROLLBACK()">rollback</a> changes to the database and release database
|
|
locks currently held</li>
|
|
<li><a href="javadoc/com/ibm/as400/access/AS400JDBCConnection.html#CLOSE()">Close the connection</a>, closing server resources immediately
|
|
instead of waiting for them to be automatically released</li>
|
|
<li><a href="javadoc/com/ibm/as400/access/AS400JDBCConnection.html#SETHOLDABILITY(INT)">Set holdability</a> and <a href="javadoc/com/ibm/as400/access/AS400JDBCConnection.html#GETHOLDABILITY()">get holdability</a> for the Connection</li>
|
|
<li><a href="javadoc/com/ibm/as400/access/AS400JDBCConnection.html#SETTRANSACTIONISOLATION(INT)">Set the transaction isolation</a> and <a href="javadoc/com/ibm/as400/access/AS400JDBCConnection.html#GETTRANSACTIONISOLATION()">get the transaction isolation</a> for the Connection</li>
|
|
<li><a href="javadoc/com/ibm/as400/access/AS400JDBCConnection.html#GETMETADATA()">Get the meta data</a> for the Connection</li>
|
|
<li><a href="javadoc/com/ibm/as400/access/AS400JDBCConnection.html#SETAUTOCOMMIT(BOOLEAN)">Set auto commit</a> on or off</li>
|
|
<li><a href="javadoc/com/ibm/as400/access/AS400JDBCConnection.html#GETSERVERJOBIDENTIFIER()">Get the job identifier of the host server job</a> that corresponds
|
|
to the Connection</li>
|
|
</ul>
|
|
<p>If you use JDBC 3.0 and connect to a server running i5/OS™ V5R2 or
|
|
later, you can use AS400JDBCConnection to perform the following actions:</p>
|
|
<ul><li> <a href="javadoc/com/ibm/as400/access/AS400JDBCConnection.html#CREATESTATEMENT(INT, INT, INT)">Create a statement with a specific result set holdability</a> (Statement,
|
|
PreparedStatement, or CallableStatement object)</li>
|
|
<li><a href="javadoc/com/ibm/as400/access/AS400JDBCConnection.html#PREPARESTATEMENT(JAVA.LANG.STRING, INT)">Create a prepared statement that returns any auto-generated
|
|
keys</a> (when getGeneratedKeys() is called on the Statement object)</li>
|
|
<li>Use <a href="jdbcsavepoint.htm#jdbcsavepoint">savepoints</a>, which
|
|
offer more granular control over transactions: <ul><li><a href="javadoc/com/ibm/as400/access/AS400JDBCConnection.html#SETSAVEPOINT()">Set savepoints</a></li>
|
|
<li><a href="javadoc/com/ibm/as400/access/AS400JDBCConnection.html#ROLLBACK(JAVA.SQL.SAVEPOINT)">Rollback savepoints</a></li>
|
|
<li><a href="javadoc/com/ibm/as400/access/AS400JDBCConnection.html#RELEASESAVEPOINT(JAVA.SQL.SAVEPOINT)">Release savepoints</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html> |