⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 connection.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 3 页
字号:
 commit has been disabled.<DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../java/sql/SQLException.html">SQLException</A></CODE> - if a database access error occurs<DT><B>See Also: </B><DD><A HREF="../../java/sql/Connection.html#setAutoCommit(boolean)"><CODE>setAutoCommit(boolean)</CODE></A></DL></DD></DL><HR><A NAME="close()"><!-- --></A><H3>close</H3><PRE>public void <B>close</B>()           throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Releases a Connection's database and JDBC resources immediately instead of waiting for them to be automatically released. <P><B>Note:</B> A Connection is automatically closed when it is garbage collected. Certain fatal errors also result in a closed Connection.<DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../java/sql/SQLException.html">SQLException</A></CODE> - if a database access error occurs</DL></DD></DL><HR><A NAME="isClosed()"><!-- --></A><H3>isClosed</H3><PRE>public boolean <B>isClosed</B>()                 throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Tests to see if a Connection is closed.<DD><DL><DT><B>Returns:</B><DD>true if the connection is closed; false if it's still open<DT><B>Throws:</B><DD><CODE><A HREF="../../java/sql/SQLException.html">SQLException</A></CODE> - if a database access error occurs</DL></DD></DL><HR><A NAME="getMetaData()"><!-- --></A><H3>getMetaData</H3><PRE>public <A HREF="../../java/sql/DatabaseMetaData.html">DatabaseMetaData</A> <B>getMetaData</B>()                             throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Gets the metadata regarding this connection's database. A Connection's database is able to provide information describing its tables, its supported SQL grammar, its stored procedures, the capabilities of this connection, and so on. This information is made available through a DatabaseMetaData object.<DD><DL><DT><B>Returns:</B><DD>a DatabaseMetaData object for this Connection<DT><B>Throws:</B><DD><CODE><A HREF="../../java/sql/SQLException.html">SQLException</A></CODE> - if a database access error occurs</DL></DD></DL><HR><A NAME="setReadOnly(boolean)"><!-- --></A><H3>setReadOnly</H3><PRE>public void <B>setReadOnly</B>(boolean&nbsp;readOnly)                 throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Puts this connection in read-only mode as a hint to enable  database optimizations. <P><B>Note:</B> This method cannot be called while in the middle of a transaction.<DD><DL><DT><B>Parameters:</B><DD><CODE>readOnly</CODE> - true enables read-only mode; false disables read-only mode.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/sql/SQLException.html">SQLException</A></CODE> - if a database access error occurs</DL></DD></DL><HR><A NAME="isReadOnly()"><!-- --></A><H3>isReadOnly</H3><PRE>public boolean <B>isReadOnly</B>()                   throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Tests to see if the connection is in read-only mode.<DD><DL><DT><B>Returns:</B><DD>true if connection is read-only and false otherwise<DT><B>Throws:</B><DD><CODE><A HREF="../../java/sql/SQLException.html">SQLException</A></CODE> - if a database access error occurs</DL></DD></DL><HR><A NAME="setCatalog(java.lang.String)"><!-- --></A><H3>setCatalog</H3><PRE>public void <B>setCatalog</B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;catalog)                throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Sets a catalog name in order to select 	 a subspace of this Connection's database in which to work. If the driver does not support catalogs, it will silently ignore this request.<DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../java/sql/SQLException.html">SQLException</A></CODE> - if a database access error occurs</DL></DD></DL><HR><A NAME="getCatalog()"><!-- --></A><H3>getCatalog</H3><PRE>public <A HREF="../../java/lang/String.html">String</A> <B>getCatalog</B>()                  throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Returns the Connection's current catalog name.<DD><DL><DT><B>Returns:</B><DD>the current catalog name or null<DT><B>Throws:</B><DD><CODE><A HREF="../../java/sql/SQLException.html">SQLException</A></CODE> - if a database access error occurs</DL></DD></DL><HR><A NAME="setTransactionIsolation(int)"><!-- --></A><H3>setTransactionIsolation</H3><PRE>public void <B>setTransactionIsolation</B>(int&nbsp;level)                             throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Attempts to change the transaction isolation level to the one given. The constants defined in the interface <code>Connection</code> are the possible transaction isolation levels. <P><B>Note:</B> This method cannot be called while in the middle of a transaction.<DD><DL><DT><B>Parameters:</B><DD><CODE>level</CODE> - one of the TRANSACTION_* isolation values with the exception of TRANSACTION_NONE; some databases may not support other values<DT><B>Throws:</B><DD><CODE><A HREF="../../java/sql/SQLException.html">SQLException</A></CODE> - if a database access error occurs<DT><B>See Also: </B><DD><A HREF="../../java/sql/DatabaseMetaData.html#supportsTransactionIsolationLevel(int)"><CODE>DatabaseMetaData.supportsTransactionIsolationLevel(int)</CODE></A></DL></DD></DL><HR><A NAME="getTransactionIsolation()"><!-- --></A><H3>getTransactionIsolation</H3><PRE>public int <B>getTransactionIsolation</B>()                            throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Gets this Connection's current transaction isolation level.<DD><DL><DT><B>Returns:</B><DD>the current TRANSACTION_* mode value<DT><B>Throws:</B><DD><CODE><A HREF="../../java/sql/SQLException.html">SQLException</A></CODE> - if a database access error occurs</DL></DD></DL><HR><A NAME="getWarnings()"><!-- --></A><H3>getWarnings</H3><PRE>public <A HREF="../../java/sql/SQLWarning.html">SQLWarning</A> <B>getWarnings</B>()                       throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Returns the first warning reported by calls on this Connection. <P><B>Note:</B> Subsequent warnings will be chained to this SQLWarning.<DD><DL><DT><B>Returns:</B><DD>the first SQLWarning or null<DT><B>Throws:</B><DD><CODE><A HREF="../../java/sql/SQLException.html">SQLException</A></CODE> - if a database access error occurs</DL></DD></DL><HR><A NAME="clearWarnings()"><!-- --></A><H3>clearWarnings</H3><PRE>public void <B>clearWarnings</B>()                   throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Clears all warnings reported for this <code>Connection</code> object.	 After a call to this method, the method <code>getWarnings</code> returns null until a new warning is reported for this Connection.<DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../java/sql/SQLException.html">SQLException</A></CODE> - if a database access error occurs</DL></DD></DL><HR><A NAME="createStatement(int, int)"><!-- --></A><H3>createStatement</H3><PRE>public <A HREF="../../java/sql/Statement.html">Statement</A> <B>createStatement</B>(int&nbsp;resultSetType,                                 int&nbsp;resultSetConcurrency)                          throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Creates a <code>Statement</code> object that will generate <code>ResultSet</code> objects with the given type and concurrency. This method is the same as the <code>createStatement</code> method above, but it allows the default result set type and result set concurrency type to be overridden.<DD><DL><DT><B>Parameters:</B><DD><CODE>resultSetType</CODE> - a result set type; see ResultSet.TYPE_XXX<DD><CODE>resultSetConcurrency</CODE> - a concurrency type; see ResultSet.CONCUR_XXX<DT><B>Returns:</B><DD>a new Statement object<DT><B>Throws:</B><DD><CODE><A HREF="../../java/sql/SQLException.html">SQLException</A></CODE> - if a database access error occurs<DT><B>Since: </B><DD>1.2</DD><DT><B>See Also: </B><DD><a href="package-summary.html#2.0 API">What Is in the JDBC 2.0 API</a></DL></DD></DL><HR><A NAME="prepareStatement(java.lang.String, int, int)"><!-- --></A><H3>prepareStatement</H3><PRE>public <A HREF="../../java/sql/PreparedStatement.html">PreparedStatement</A> <B>prepareStatement</B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;sql,                                          int&nbsp;resultSetType,                                          int&nbsp;resultSetConcurrency)                                   throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Creates a <code>PreparedStatement</code> object that will generate <code>ResultSet</code> objects with the given type and concurrency. This method is the same as the <code>prepareStatement</code> method above, but it allows the default result set type and result set concurrency type to be overridden.<DD><DL><DT><B>Parameters:</B><DD><CODE>resultSetType</CODE> - a result set type; see ResultSet.TYPE_XXX<DD><CODE>resultSetConcurrency</CODE> - a concurrency type; see ResultSet.CONCUR_XXX<DT><B>Returns:</B><DD>a new PreparedStatement object containing the pre-compiled SQL statement<DT><B>Throws:</B><DD><CODE><A HREF="../../java/sql/SQLException.html">SQLException</A></CODE> - if a database access error occurs<DT><B>Since: </B><DD>1.2</DD><DT><B>See Also: </B><DD><a href="package-summary.html#2.0 API">What Is in the JDBC 2.0 API</a></DL></DD></DL><HR><A NAME="prepareCall(java.lang.String, int, int)"><!-- --></A><H3>prepareCall</H3><PRE>public <A HREF="../../java/sql/CallableStatement.html">CallableStatement</A> <B>prepareCall</B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;sql,                                     int&nbsp;resultSetType,                                     int&nbsp;resultSetConcurrency)                              throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Creates a <code>CallableStatement</code> object that will generate <code>ResultSet</code> objects with the given type and concurrency. This method is the same as the <code>prepareCall</code> method above, but it allows the default result set type and result set concurrency type to be overridden.<DD><DL><DT><B>Parameters:</B><DD><CODE>resultSetType</CODE> - a result set type; see ResultSet.TYPE_XXX<DD><CODE>resultSetConcurrency</CODE> - a concurrency type; see ResultSet.CONCUR_XXX<DT><B>Returns:</B><DD>a new CallableStatement object containing the pre-compiled SQL statement<DT><B>Throws:</B><DD><CODE><A HREF="../../java/sql/SQLException.html">SQLException</A></CODE> - if a database access error occurs<DT><B>Since: </B><DD>1.2</DD><DT><B>See Also: </B><DD><a href="package-summary.html#2.0 API">What Is in the JDBC 2.0 API</a></DL></DD></DL><HR><A NAME="getTypeMap()"><!-- --></A><H3>getTypeMap</H3><PRE>public <A HREF="../../java/util/Map.html">Map</A> <B>getTypeMap</B>()               throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Gets the type map object associated with this connection. Unless the application has added an entry to the type map, the map returned will be empty.<DD><DL><DT><B>Returns:</B><DD>the <code>java.util.Map</code> object associated          with this <code>Connection</code> object<DT><B>Since: </B><DD>1.2</DD><DT><B>See Also: </B><DD><a href="package-summary.html#2.0 API">What Is in the JDBC 2.0 API</a></DL></DD></DL><HR><A NAME="setTypeMap(java.util.Map)"><!-- --></A><H3>setTypeMap</H3><PRE>public void <B>setTypeMap</B>(<A HREF="../../java/util/Map.html">Map</A>&nbsp;map)                throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Installs the given type map as the type map for this connection.  The type map will be used for the custom mapping of SQL structured types and distinct types.<DD><DL><DT><B>Parameters:</B><DD><CODE>the</CODE> - <code>java.util.Map</code> object to install        as the replacement for this <code>Connection</code>        object's default type map<DT><B>Since: </B><DD>1.2</DD><DT><B>See Also: </B><DD><a href="package-summary.html#2.0 API">What Is in the JDBC 2.0 API</a></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Connection.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../java/sql/Clob.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../java/sql/DatabaseMetaData.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="Connection.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation  contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A.  All Rights Reserved.</font></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -