Author: paul
Date: 2006-01-07 02:05:13 +0100 (Sat, 07 Jan 2006)
New Revision: 714
Log:
r5942@frost: paul | 2006-01-06 19:04:13 -0600
Add markup.
Modified:
trunk/
trunk/refman-4.1/connector-j.xml
trunk/refman-5.0/connector-j.xml
trunk/refman-5.1/connector-j.xml
trunk/refman-common/titles.en.ent
trunk/tools/xmlformat.conf
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:5912
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:1994
+ b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:5942
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:1994
Modified: trunk/refman-4.1/connector-j.xml
===================================================================
--- trunk/refman-4.1/connector-j.xml 2006-01-06 23:10:10 UTC (rev 713)
+++ trunk/refman-4.1/connector-j.xml 2006-01-07 01:05:13 UTC (rev 714)
@@ -95,7 +95,7 @@
<para>
The <literal>DriverManager</literal> needs to be told which JDBC
drivers it should try to make Connections with. The easiest way
- to do this is to use <literal>Class.forName()</literal> on the
+ to do this is to use <function>Class.forName()</function> on the
class that implements the <literal>java.sql.Driver</literal>
interface. With MySQL Connector/J, the name of this class is
<literal>com.mysql.jdbc.Driver</literal>. With this method, you
@@ -106,7 +106,7 @@
<para>
The following section of Java code shows how you might register
- MySQL Connector/J from the <literal>main()</literal> method of
+ MySQL Connector/J from the <function>main()</function> method of
your application:
</para>
@@ -134,7 +134,7 @@
<literal>DriverManager</literal>, you can obtain a
<literal>Connection</literal> instance that is connected to a
particular database by calling
- <literal>DriverManager.getConnection()</literal>:
+ <function>DriverManager.getConnection()</function>:
</para>
<example>
@@ -145,9 +145,9 @@
This example shows how you can obtain a
<literal>Connection</literal> instance from the
<literal>DriverManager</literal>. There are a few different
- signatures for the <literal>getConnection()</literal> method.
- You should see the API documentation that comes with your JDK
- for more specific information on how to use them.
+ signatures for the <function>getConnection()</function>
+ method. You should see the API documentation that comes with
+ your JDK for more specific information on how to use them.
</para>
<programlisting>
@@ -170,9 +170,9 @@
</programlisting>
<para>
- Once a <literal>Connection</literal> is established, it can be
- used to create <literal>Statement</literal> and
- <literal>PreparedStatement</literal> objects, as well as
+ Once a <classname>Connection</classname> is established, it
+ can be used to create <classname>Statement</classname> and
+ <classname>PreparedStatement</classname> objects, as well as
retrieve metadata about the database. This is explained in the
following sections.
</para>
@@ -191,7 +191,7 @@
<!--
<section id="cj-controlling-transactions">
- <title>Controlling transactions</title>
+ <title>&title-cj-controlling-transactions;</title>
<para />
</section>
@@ -199,32 +199,32 @@
<section id="cj-using-statements">
- <title>Using Statements to Execute SQL</title>
+ <title>&title-cj-using-statements;</title>
<para>
- <literal>Statement</literal> objects allow you to execute basic
- SQL queries and retrieve the results through the
+ <classname>Statement</classname> objects allow you to execute
+ basic SQL queries and retrieve the results through the
<literal>ResultSet</literal> class which is described later.
</para>
<para>
- To create a <literal>Statement</literal> instance, you call the
- <literal>createStatement()</literal> method on the
+ To create a <classname>Statement</classname> instance, you call
+ the <function>createStatement()</function> method on the
<literal>Connection</literal> object you have retrieved via one
- of the <literal>DriverManager.getConnection()</literal> or
- <literal>DataSource.getConnection()</literal> methods described
- earlier.
+ of the <function>DriverManager.getConnection()</function> or
+ <function>DataSource.getConnection()</function> methods
+ described earlier.
</para>
<para>
- Once you have a <literal>Statement</literal> instance, you can
- execute a <literal>SELECT</literal> query by calling the
+ Once you have a <classname>Statement</classname> instance, you
+ can execute a <literal>SELECT</literal> query by calling the
<literal>executeQuery(String)</literal> method with the SQL you
want to use.
</para>
<para>
- To update data in the database use the
+ To update data in the database, use the
<literal>executeUpdate(String SQL)</literal> method. This method
returns the number of rows affected by the update statement.
</para>
@@ -239,12 +239,12 @@
<literal>UPDATE</literal>, <literal>INSERT</literal>, or
<literal>DELETE</literal> statement. If the statement was a
<literal>SELECT</literal> query, you can retrieve the results by
- calling the <literal>getResultSet()</literal> method. If the
+ calling the <function>getResultSet()</function> method. If the
statement was an <literal>UPDATE</literal>,
<literal>INSERT</literal>, or <literal>DELETE</literal>
statement, you can retrieve the affected rows count by calling
- <literal>getUpdateCount()</literal> on the
- <literal>Statement</literal> instance.
+ <function>getUpdateCount()</function> on the
+ <classname>Statement</classname> instance.
</para>
<example>
@@ -296,7 +296,7 @@
<!--
<section id="cj-using-prepared-statements">
- <title>Using PreparedStatements to Execute SQL</title>
+ <title>&title-cj-using-prepared-statements;</title>
<para />
</section>
@@ -304,7 +304,7 @@
<section id="cj-using-callable-statements">
- <title>Using CallableStatements to Execute Stored Procedures</title>
+ <title>&title-cj-using-callable-statements;</title>
<para>
Starting with MySQL server version 5.0 when used with
@@ -328,16 +328,10 @@
<para>
The following example shows a stored procedure that returns the
- value of
+ value of <varname>inOutParam</varname> incremented by 1, and the
+ string passed in via <varname>inputParam</varname> as a
+ <classname>ResultSet</classname>:
- <varname>inOutParam</varname>
-
- incremented by 1, and the string passed in via
-
- <varname>inputParam</varname>
-
- as a <classname>ResultSet</classname>:
-
<example>
<title>Stored Procedure Example</title>
@@ -377,7 +371,7 @@
<example>
- <title>Using Connection.prepareCall()</title>
+ <title>Using <function>Connection.prepareCall()</function></title>
<programlisting>import java.sql.CallableStatement;
@@ -484,7 +478,7 @@
<example>
- <title>Setting CallableStatement Input Parameters</title>
+ <title>Setting <literal>CallableStatement</literal> Input Parameters</title>
<programlisting>...
@@ -529,12 +523,12 @@
<para>
Although <classname>CallableStatement</classname> supports
calling any of the <classname>Statement</classname> execute
- methods ( <function>executeUpdate()</function>,
+ methods (<function>executeUpdate()</function>,
<function>executeQuery()</function> or
- <function>execute()</function> ), the most flexible method
- to call is <function>execute()</function>, as you do not
- need to know ahead of time if the stored procedure returns
- result sets:
+ <function>execute()</function>), the most flexible method to
+ call is <function>execute()</function>, as you do not need
+ to know ahead of time if the stored procedure returns result
+ sets:
<example>
@@ -580,32 +574,38 @@
<section id="cj-retrieve-autoinc">
- <title>Retrieving AUTO_INCREMENT Column Values</title>
+ <title>&title-cj-retrieve-autoinc;</title>
<para>
Before version 3.0 of the JDBC API, there was no standard way of
- retrieving key values from databases that supported 'auto
- increment' or identity columns. With older JDBC drivers for
- MySQL, you could always use a MySQL- specific method on the
- Statement interface, or issue the query 'SELECT
- LAST_INSERT_ID()' after issuing an 'INSERT' to a table that had
- an AUTO_INCREMENT key. Using the MySQL-specific method call
- isn't portable, and issuing a 'SELECT' to get the AUTO_INCREMENT
- key's value requires another round- trip to the database, which
- isn't as efficient as possible. The following code snippets
- demonstrate the three different ways to retrieve AUTO_INCREMENT
+ retrieving key values from databases that supported <quote>auto
+ increment</quote> or identity columns. With older JDBC drivers
+ for MySQL, you could always use a MySQL-specific method on the
+ <classname>Statement</classname> interface, or issue the query
+ <literal>SELECT LAST_INSERT_ID()</literal> after issuing an
+ <literal>INSERT</literal> to a table that had an
+ <literal>AUTO_INCREMENT</literal> key. Using the MySQL-specific
+ method call isn't portable, and issuing a
+ <literal>SELECT</literal> to get the
+ <literal>AUTO_INCREMENT</literal> key's value requires another
+ round-trip to the database, which isn't as efficient as
+ possible. The following code snippets demonstrate the three
+ different ways to retrieve <literal>AUTO_INCREMENT</literal>
values. First, we demonstrate the use of the new JDBC-3.0 method
- 'getGeneratedKeys()' which is now the preferred method to use if
- you need to retrieve AUTO_INCREMENT keys and have access to
+ <function>getGeneratedKeys()</function> which is now the
+ preferred method to use if you need to retrieve
+ <literal>AUTO_INCREMENT</literal> keys and have access to
JDBC-3.0. The second example shows how you can retrieve the same
- value using a standard 'SELECT LAST_INSERT_ID()' query. The
- final example shows how updatable result sets can retrieve the
- AUTO_INCREMENT value when using the method 'insertRow()'.
+ value using a standard <literal>SELECT
+ LAST_INSERT_ID()</literal> query. The final example shows how
+ updatable result sets can retrieve the
+ <literal>AUTO_INCREMENT</literal> value when using the
+ <function>insertRow()</function> method.
<example>
- <title>Retrieving AUTO_INCREMENT Column Values using
- Statement.getGeneratedKeys()</title>
+ <title>Retrieving <literal>AUTO_INCREMENT</literal> Column Values using
+ <function>Statement.getGeneratedKeys()</function></title>
<programlisting> Statement stmt = null;
ResultSet rs = null;
@@ -688,7 +688,8 @@
<example>
- <title>Retrieving AUTO_INCREMENT Column Values using 'SELECT LAST_INSERT_ID()'</title>
+ <title>Retrieving <literal>AUTO_INCREMENT</literal> Column Values using
+ <function>SELECT LAST_INSERT_ID()</function></title>
<programlisting> Statement stmt = null;
ResultSet rs = null;
@@ -763,7 +764,8 @@
<example>
- <title>Retrieving AUTO_INCREMENT Column Values in Updatable ResultSets</title>
+ <title>Retrieving <literal>AUTO_INCREMENT</literal> Column Values in
+ <literal>Updatable ResultSets</literal></title>
<programlisting> Statement stmt = null;
ResultSet rs = null;
@@ -846,25 +848,26 @@
</example>
- When you run the example code above, you should get the
- following output: Key returned from getGeneratedKeys(): 1 Key
- returned from 'SELECT LAST_INSERT_ID()': 1 Key returned for
+ When you run the preceding example code, you should get the
+ following output: Key returned from
+ <function>getGeneratedKeys()</function>: 1 Key returned from
+ <literal>SELECT LAST_INSERT_ID()</literal>: 1 Key returned for
inserted row: 2 You should be aware, that at times, it can be
- tricky to use the 'SELECT LAST_INSERT_ID()' query, as that
- function's value is scoped to a connection. So, if some other
- query happens on the same connection, the value will be
- overwritten. On the other hand, the 'getGeneratedKeys()' method
- is scoped by the Statement instance, so it can be used even if
- other queries happen on the same connection, but not on the same
- Statement instance.
+ tricky to use the <literal>SELECT LAST_INSERT_ID()</literal>
+ query, as that function's value is scoped to a connection. So,
+ if some other query happens on the same connection, the value
+ will be overwritten. On the other hand, the
+ <function>getGeneratedKeys()</function> method is scoped by the
+ <classname>Statement</classname> instance, so it can be used
+ even if other queries happen on the same connection, but not on
+ the same <classname>Statement</classname> instance.
</para>
</section>
<!--
<section id="cj-retrieve-multiresults">
- <title>Retrieving Multiple ResultSets from a Statement or
- CallableStatement</title>
+ <title>&title-cj-retrieve-multiresults;</title>
<para />
</section>
@@ -872,8 +875,7 @@
<!--
<section id="cj-using-result-set-metadata">
- <title>Using ResultSetMetaData to Retrieve Information about a
- ResultSet</title>
+ <title>&title-cj-using-result-set-metadata;</title>
<para />
</section>
@@ -881,8 +883,7 @@
<!--
<section id="cj-using-database-metadata">
- <title>Using DatabaseMetaData to Retrieve Information about a
- Database</title>
+ <title>&title-cj-using-database-metadata;</title>
<para />
</section>
@@ -890,7 +891,7 @@
<!--
<section id="cj-working-with-lobs">
- <title>Working with BLOBs and CLOBs</title>
+ <title>&title-cj-working-with-lobs;</title>
<para />
</section>
@@ -924,12 +925,14 @@
</para>
<para>
- Because of the implementation of java.sql.Savepoint,
- Connector/J 3.1.0 and newer will not run on JDKs older than
- 1.4 unless the class verifier is turned off (-Xverify:none),
- as the class verifier will try to load the class definition
- for java.sql.Savepoint even though it is not accessed by the
- driver unless you actually use savepoint functionality.
+ Because of the implementation of
+ <classname>java.sql.Savepoint</classname>, Connector/J 3.1.0
+ and newer will not run on JDKs older than 1.4 unless the class
+ verifier is turned off (<option>-Xverify:none</option>), as
+ the class verifier will try to load the class definition for
+ <classname>java.sql.Savepoint</classname> even though it is
+ not accessed by the driver unless you actually use savepoint
+ functionality.
</para>
<para>
@@ -939,11 +942,15 @@
first available in JDK-1.4.0.
</para>
+ <remark>
+ MARKUP DONE TO HERE
+ </remark>
+
</section>
<section id="cj-supported-mysql-versions">
- <title>MySQL Server Version Guidelines</title>
+ <title>&title-cj-supported-mysql-versions;</title>
<para>
MySQL Connector/J supports all known MySQL server versions.
@@ -971,7 +978,7 @@
<section id="cj-classpath">
- <title>Installing the Driver and Configuring the CLASSPATH</title>
+ <title>&title-cj-classpath;</title>
<para>
MySQL Connector/J is distributed as a .zip or .tar.gz archive
@@ -1126,7 +1133,7 @@
<section id="cj-upgrading">
- <title>Upgrading from an Older Version</title>
+ <title>&title-cj-upgrading;</title>
<para>
MySQL AB tries to keep the upgrade process as easy as possible,
@@ -1144,7 +1151,7 @@
<section id="cj-upgrading-3-0-to-3-1">
- <title>Upgrading from MySQL Connector/J 3.0 to 3.1</title>
+ <title>&title-cj-upgrading-3-0-to-3-1;</title>
<para>
Connector/J 3.1 is designed to be backward-compatible with
@@ -1305,7 +1312,7 @@
<section id="cj-jdbc-upgrading-issues">
- <title>JDBC-Specific Issues When Upgrading to MySQL Server 4.1 or Newer</title>
+ <title>&title-cj-jdbc-upgrading-issues;</title>
<itemizedlist>
@@ -1360,14 +1367,13 @@
<section id="cj-jdbc-reference">
- <title>JDBC Reference</title>
+ <title>&title-cj-jdbc-reference;</title>
<para></para>
<section id="cj-configuration-properties">
- <title>Driver/Datasource Class Names, URL Syntax and Configuration Properties
- for Connector/J</title>
+ <title>&title-cj-configuration-properties;</title>
<para>
The name of the class that implements java.sql.Driver in MySQL
@@ -1395,13 +1401,14 @@
<para>
If the database is not specified, the connection will be made
- with no 'current' database. In this case, you will need to
- either call the 'setCatalog()' method on the Connection instance
- or fully-specify table names using the database name (i.e.
- 'SELECT dbname.tablename.colname FROM dbname.tablename...') in
- your SQL. Not specifying the database to use upon connection is
- generally only useful when building tools that work with
- multiple databases, such as GUI database managers.
+ with no default database. In this case, you will need to either
+ call the <function>setCatalog()</function> method on the
+ Connection instance or fully-specify table names using the
+ database name (i.e. 'SELECT dbname.tablename.colname FROM
+ dbname.tablename...') in your SQL. Not specifying the database
+ to use upon connection is generally only useful when building
+ tools that work with multiple databases, such as GUI database
+ managers.
</para>
<para>
@@ -2494,7 +2501,7 @@
<section id="cj-implementation-notes">
- <title>JDBC API Implementation Notes</title>
+ <title>&title-cj-implementation-notes;</title>
<para>
MySQL Connector/J passes all of the tests in the
@@ -2578,14 +2585,15 @@
</para>
<para>
- Unlike older versions of MM.MySQL the 'isClosed()' method
- does not <quote>ping</quote> the server to determine if it
- is alive. In accordance with the JDBC specification, it only
- returns true if 'closed()' has been called on the
- connection. If you need to determine if the connection is
- still valid, you should issue a simple query, such as
- "SELECT 1". The driver will throw an exception if the
- connection is no longer valid.
+ Unlike older versions of MM.MySQL the
+ <function>isClosed()</function> method does not
+ <quote>ping</quote> the server to determine if it is alive.
+ In accordance with the JDBC specification, it only returns
+ true if 'closed()' has been called on the connection. If you
+ need to determine if the connection is still valid, you
+ should issue a simple query, such as "SELECT 1". The driver
+ will throw an exception if the connection is no longer
+ valid.
</para>
</listitem>
@@ -2790,7 +2798,7 @@
<section id="cj-type-conversions">
- <title>Java, JDBC and MySQL Types</title>
+ <title>&title-cj-type-conversions;</title>
<para>
MySQL Connector/J is flexible in the way it handles conversions
@@ -3027,7 +3035,7 @@
<section id="cj-character-sets">
- <title>Using Character Sets and Unicode</title>
+ <title>&title-cj-character-sets;</title>
<para>
All strings sent from the JDBC driver to the server are
@@ -3300,7 +3308,7 @@
<!--
<section id="cj-usage-advisor">
- <title>Using the Usage Advisor</title>
+ <title>&title-cj-usage-advisor;</title>
<para></para>
</section>
@@ -3308,7 +3316,7 @@
<section id="cj-using-ssl">
- <title>Connecting Securely Using SSL</title>
+ <title>&title-cj-using-ssl;</title>
<para>
SSL in MySQL Connector/J encrypts all data (other than the
@@ -3497,7 +3505,7 @@
<section id="cj-replication-connection">
- <title>Using Master/Slave Replication with ReplicationConnection</title>
+ <title>&title-cj-replication-connection;</title>
<para>
Starting with Connector/J 3.1.7, we've made available a variant
@@ -3606,7 +3614,7 @@
<section id="cj-j2ee">
- <title>Using Connector/J with J2EE and Other Java Frameworks</title>
+ <title>&title-cj-j2ee;</title>
<para>
This section describes how to use Connector/J in several contexts.
@@ -3614,7 +3622,7 @@
<section id="cj-general-j2ee-concepts">
- <title>General J2EE Concepts</title>
+ <title>&title-cj-general-j2ee-concepts;</title>
<para>
This section provides general background on J2EE concepts that
@@ -3623,7 +3631,7 @@
<section id="cj-connection-pooling">
- <title>Understanding Connection Pooling</title>
+ <title>&title-cj-connection-pooling;</title>
<para>
Connection pooling is a technique of creating and managing a
@@ -3892,7 +3900,7 @@
<!--
<section id="cj-understanding-transactions">
- <title>Understanding Transactions</title>
+ <title>&title-cj-understanding-transactions;</title>
<para />
</section>
@@ -3902,7 +3910,7 @@
<section id="cj-tomcat-config">
- <title>Using Connector/J with Tomcat</title>
+ <title>&title-cj-tomcat-config;</title>
<para>
The following instructions are based on the instructions for
@@ -4066,7 +4074,7 @@
<section id="cj-jboss-config">
- <title>Using Connector/J with JBoss</title>
+ <title>&title-cj-jboss-config;</title>
<para>
These instructions cover JBoss-4.x. To make the JDBC driver
@@ -4121,7 +4129,7 @@
<!--
<section id="cj-hibernate-config">
- <title>Using Connector/J with Hibernate</title>
+ <title>&title-cj-hibernate-config;</title>
<para></para>
</section>
@@ -4129,7 +4137,7 @@
<!--
<section id="cj-spring-config">
- <title>Using Connector/J with Spring</title>
+ <title>&title-cj-spring-config;</title>
<para />
</section>
@@ -4137,7 +4145,7 @@
<!--
<section id="cj-struts-config">
- <title>Using Connector/J with Struts</title>
+ <title>&title-cj-struts-config;</title>
<para />
</section>
@@ -4146,7 +4154,7 @@
<!--
<section id="cj-weblogic-config">
- <title>Using Connector/J with BEA WebLogic</title>
+ <title>&title-cj-weblogic-config;</title>
<para />
</section>
@@ -4154,7 +4162,7 @@
<!--
<section id="cj-websphere-config">
- <title>Using Connector/J with IBM WebSphere</title>
+ <title>&title-cj-websphere-config;</title>
<para />
</section>
@@ -4162,7 +4170,7 @@
<!--
<section id="cj-ias-config">
- <title>Using Connector/J with Oracle Application Server</title>
+ <title>&title-cj-ias-config;</title>
<para />
</section>
@@ -4172,7 +4180,7 @@
<section id="cj-troubleshooting">
- <title>Diagnosing Connector/J Problems</title>
+ <title>&title-cj-troubleshooting;</title>
<para>
This section describes how to solve problems that you may
@@ -4181,7 +4189,7 @@
<section id="cj-faq">
- <title>Common Problems and Solutions</title>
+ <title>&title-cj-faq;</title>
<para>
There are a few issues that seem to be commonly encountered
@@ -4580,7 +4588,7 @@
<!--
<section id="cj-tracing">
- <title>Enabling Tracing Options</title>
+ <title>&title-cj-tracing;</title>
<para></para>
</section>
@@ -4588,7 +4596,7 @@
<section id="cj-reporting-bugs">
- <title>How to Report Bugs or Problems</title>
+ <title>&title-cj-reporting-bugs;</title>
<para>
The normal place to report bugs is
@@ -4699,7 +4707,7 @@
<para>
In the <methodname>runTest</methodname> () method, create code
that demonstrates the bug using the tables and data you created
- in the 'setUp' method.
+ in the <function>setUp</function> method.
</para>
<para>
Modified: trunk/refman-5.0/connector-j.xml
===================================================================
--- trunk/refman-5.0/connector-j.xml 2006-01-06 23:10:10 UTC (rev 713)
+++ trunk/refman-5.0/connector-j.xml 2006-01-07 01:05:13 UTC (rev 714)
@@ -95,7 +95,7 @@
<para>
The <literal>DriverManager</literal> needs to be told which JDBC
drivers it should try to make Connections with. The easiest way
- to do this is to use <literal>Class.forName()</literal> on the
+ to do this is to use <function>Class.forName()</function> on the
class that implements the <literal>java.sql.Driver</literal>
interface. With MySQL Connector/J, the name of this class is
<literal>com.mysql.jdbc.Driver</literal>. With this method, you
@@ -106,7 +106,7 @@
<para>
The following section of Java code shows how you might register
- MySQL Connector/J from the <literal>main()</literal> method of
+ MySQL Connector/J from the <function>main()</function> method of
your application:
</para>
@@ -134,7 +134,7 @@
<literal>DriverManager</literal>, you can obtain a
<literal>Connection</literal> instance that is connected to a
particular database by calling
- <literal>DriverManager.getConnection()</literal>:
+ <function>DriverManager.getConnection()</function>:
</para>
<example>
@@ -145,9 +145,9 @@
This example shows how you can obtain a
<literal>Connection</literal> instance from the
<literal>DriverManager</literal>. There are a few different
- signatures for the <literal>getConnection()</literal> method.
- You should see the API documentation that comes with your JDK
- for more specific information on how to use them.
+ signatures for the <function>getConnection()</function>
+ method. You should see the API documentation that comes with
+ your JDK for more specific information on how to use them.
</para>
<programlisting>
@@ -170,9 +170,9 @@
</programlisting>
<para>
- Once a <literal>Connection</literal> is established, it can be
- used to create <literal>Statement</literal> and
- <literal>PreparedStatement</literal> objects, as well as
+ Once a <classname>Connection</classname> is established, it
+ can be used to create <classname>Statement</classname> and
+ <classname>PreparedStatement</classname> objects, as well as
retrieve metadata about the database. This is explained in the
following sections.
</para>
@@ -191,7 +191,7 @@
<!--
<section id="cj-controlling-transactions">
- <title>Controlling transactions</title>
+ <title>&title-cj-controlling-transactions;</title>
<para />
</section>
@@ -199,32 +199,32 @@
<section id="cj-using-statements">
- <title>Using Statements to Execute SQL</title>
+ <title>&title-cj-using-statements;</title>
<para>
- <literal>Statement</literal> objects allow you to execute basic
- SQL queries and retrieve the results through the
+ <classname>Statement</classname> objects allow you to execute
+ basic SQL queries and retrieve the results through the
<literal>ResultSet</literal> class which is described later.
</para>
<para>
- To create a <literal>Statement</literal> instance, you call the
- <literal>createStatement()</literal> method on the
+ To create a <classname>Statement</classname> instance, you call
+ the <function>createStatement()</function> method on the
<literal>Connection</literal> object you have retrieved via one
- of the <literal>DriverManager.getConnection()</literal> or
- <literal>DataSource.getConnection()</literal> methods described
- earlier.
+ of the <function>DriverManager.getConnection()</function> or
+ <function>DataSource.getConnection()</function> methods
+ described earlier.
</para>
<para>
- Once you have a <literal>Statement</literal> instance, you can
- execute a <literal>SELECT</literal> query by calling the
+ Once you have a <classname>Statement</classname> instance, you
+ can execute a <literal>SELECT</literal> query by calling the
<literal>executeQuery(String)</literal> method with the SQL you
want to use.
</para>
<para>
- To update data in the database use the
+ To update data in the database, use the
<literal>executeUpdate(String SQL)</literal> method. This method
returns the number of rows affected by the update statement.
</para>
@@ -239,12 +239,12 @@
<literal>UPDATE</literal>, <literal>INSERT</literal>, or
<literal>DELETE</literal> statement. If the statement was a
<literal>SELECT</literal> query, you can retrieve the results by
- calling the <literal>getResultSet()</literal> method. If the
+ calling the <function>getResultSet()</function> method. If the
statement was an <literal>UPDATE</literal>,
<literal>INSERT</literal>, or <literal>DELETE</literal>
statement, you can retrieve the affected rows count by calling
- <literal>getUpdateCount()</literal> on the
- <literal>Statement</literal> instance.
+ <function>getUpdateCount()</function> on the
+ <classname>Statement</classname> instance.
</para>
<example>
@@ -296,7 +296,7 @@
<!--
<section id="cj-using-prepared-statements">
- <title>Using PreparedStatements to Execute SQL</title>
+ <title>&title-cj-using-prepared-statements;</title>
<para />
</section>
@@ -304,7 +304,7 @@
<section id="cj-using-callable-statements">
- <title>Using CallableStatements to Execute Stored Procedures</title>
+ <title>&title-cj-using-callable-statements;</title>
<para>
Starting with MySQL server version 5.0 when used with
@@ -328,16 +328,10 @@
<para>
The following example shows a stored procedure that returns the
- value of
+ value of <varname>inOutParam</varname> incremented by 1, and the
+ string passed in via <varname>inputParam</varname> as a
+ <classname>ResultSet</classname>:
- <varname>inOutParam</varname>
-
- incremented by 1, and the string passed in via
-
- <varname>inputParam</varname>
-
- as a <classname>ResultSet</classname>:
-
<example>
<title>Stored Procedure Example</title>
@@ -377,7 +371,7 @@
<example>
- <title>Using Connection.prepareCall()</title>
+ <title>Using <function>Connection.prepareCall()</function></title>
<programlisting>import java.sql.CallableStatement;
@@ -484,7 +478,7 @@
<example>
- <title>Setting CallableStatement Input Parameters</title>
+ <title>Setting <literal>CallableStatement</literal> Input Parameters</title>
<programlisting>...
@@ -529,12 +523,12 @@
<para>
Although <classname>CallableStatement</classname> supports
calling any of the <classname>Statement</classname> execute
- methods ( <function>executeUpdate()</function>,
+ methods (<function>executeUpdate()</function>,
<function>executeQuery()</function> or
- <function>execute()</function> ), the most flexible method
- to call is <function>execute()</function>, as you do not
- need to know ahead of time if the stored procedure returns
- result sets:
+ <function>execute()</function>), the most flexible method to
+ call is <function>execute()</function>, as you do not need
+ to know ahead of time if the stored procedure returns result
+ sets:
<example>
@@ -580,32 +574,38 @@
<section id="cj-retrieve-autoinc">
- <title>Retrieving AUTO_INCREMENT Column Values</title>
+ <title>&title-cj-retrieve-autoinc;</title>
<para>
Before version 3.0 of the JDBC API, there was no standard way of
- retrieving key values from databases that supported 'auto
- increment' or identity columns. With older JDBC drivers for
- MySQL, you could always use a MySQL- specific method on the
- Statement interface, or issue the query 'SELECT
- LAST_INSERT_ID()' after issuing an 'INSERT' to a table that had
- an AUTO_INCREMENT key. Using the MySQL-specific method call
- isn't portable, and issuing a 'SELECT' to get the AUTO_INCREMENT
- key's value requires another round- trip to the database, which
- isn't as efficient as possible. The following code snippets
- demonstrate the three different ways to retrieve AUTO_INCREMENT
+ retrieving key values from databases that supported <quote>auto
+ increment</quote> or identity columns. With older JDBC drivers
+ for MySQL, you could always use a MySQL-specific method on the
+ <classname>Statement</classname> interface, or issue the query
+ <literal>SELECT LAST_INSERT_ID()</literal> after issuing an
+ <literal>INSERT</literal> to a table that had an
+ <literal>AUTO_INCREMENT</literal> key. Using the MySQL-specific
+ method call isn't portable, and issuing a
+ <literal>SELECT</literal> to get the
+ <literal>AUTO_INCREMENT</literal> key's value requires another
+ round-trip to the database, which isn't as efficient as
+ possible. The following code snippets demonstrate the three
+ different ways to retrieve <literal>AUTO_INCREMENT</literal>
values. First, we demonstrate the use of the new JDBC-3.0 method
- 'getGeneratedKeys()' which is now the preferred method to use if
- you need to retrieve AUTO_INCREMENT keys and have access to
+ <function>getGeneratedKeys()</function> which is now the
+ preferred method to use if you need to retrieve
+ <literal>AUTO_INCREMENT</literal> keys and have access to
JDBC-3.0. The second example shows how you can retrieve the same
- value using a standard 'SELECT LAST_INSERT_ID()' query. The
- final example shows how updatable result sets can retrieve the
- AUTO_INCREMENT value when using the method 'insertRow()'.
+ value using a standard <literal>SELECT
+ LAST_INSERT_ID()</literal> query. The final example shows how
+ updatable result sets can retrieve the
+ <literal>AUTO_INCREMENT</literal> value when using the
+ <function>insertRow()</function> method.
<example>
- <title>Retrieving AUTO_INCREMENT Column Values using
- Statement.getGeneratedKeys()</title>
+ <title>Retrieving <literal>AUTO_INCREMENT</literal> Column Values using
+ <function>Statement.getGeneratedKeys()</function></title>
<programlisting> Statement stmt = null;
ResultSet rs = null;
@@ -688,7 +688,8 @@
<example>
- <title>Retrieving AUTO_INCREMENT Column Values using 'SELECT LAST_INSERT_ID()'</title>
+ <title>Retrieving <literal>AUTO_INCREMENT</literal> Column Values using
+ <function>SELECT LAST_INSERT_ID()</function></title>
<programlisting> Statement stmt = null;
ResultSet rs = null;
@@ -763,7 +764,8 @@
<example>
- <title>Retrieving AUTO_INCREMENT Column Values in Updatable ResultSets</title>
+ <title>Retrieving <literal>AUTO_INCREMENT</literal> Column Values in
+ <literal>Updatable ResultSets</literal></title>
<programlisting> Statement stmt = null;
ResultSet rs = null;
@@ -846,25 +848,26 @@
</example>
- When you run the example code above, you should get the
- following output: Key returned from getGeneratedKeys(): 1 Key
- returned from 'SELECT LAST_INSERT_ID()': 1 Key returned for
+ When you run the preceding example code, you should get the
+ following output: Key returned from
+ <function>getGeneratedKeys()</function>: 1 Key returned from
+ <literal>SELECT LAST_INSERT_ID()</literal>: 1 Key returned for
inserted row: 2 You should be aware, that at times, it can be
- tricky to use the 'SELECT LAST_INSERT_ID()' query, as that
- function's value is scoped to a connection. So, if some other
- query happens on the same connection, the value will be
- overwritten. On the other hand, the 'getGeneratedKeys()' method
- is scoped by the Statement instance, so it can be used even if
- other queries happen on the same connection, but not on the same
- Statement instance.
+ tricky to use the <literal>SELECT LAST_INSERT_ID()</literal>
+ query, as that function's value is scoped to a connection. So,
+ if some other query happens on the same connection, the value
+ will be overwritten. On the other hand, the
+ <function>getGeneratedKeys()</function> method is scoped by the
+ <classname>Statement</classname> instance, so it can be used
+ even if other queries happen on the same connection, but not on
+ the same <classname>Statement</classname> instance.
</para>
</section>
<!--
<section id="cj-retrieve-multiresults">
- <title>Retrieving Multiple ResultSets from a Statement or
- CallableStatement</title>
+ <title>&title-cj-retrieve-multiresults;</title>
<para />
</section>
@@ -872,8 +875,7 @@
<!--
<section id="cj-using-result-set-metadata">
- <title>Using ResultSetMetaData to Retrieve Information about a
- ResultSet</title>
+ <title>&title-cj-using-result-set-metadata;</title>
<para />
</section>
@@ -881,8 +883,7 @@
<!--
<section id="cj-using-database-metadata">
- <title>Using DatabaseMetaData to Retrieve Information about a
- Database</title>
+ <title>&title-cj-using-database-metadata;</title>
<para />
</section>
@@ -890,7 +891,7 @@
<!--
<section id="cj-working-with-lobs">
- <title>Working with BLOBs and CLOBs</title>
+ <title>&title-cj-working-with-lobs;</title>
<para />
</section>
@@ -924,12 +925,14 @@
</para>
<para>
- Because of the implementation of java.sql.Savepoint,
- Connector/J 3.1.0 and newer will not run on JDKs older than
- 1.4 unless the class verifier is turned off (-Xverify:none),
- as the class verifier will try to load the class definition
- for java.sql.Savepoint even though it is not accessed by the
- driver unless you actually use savepoint functionality.
+ Because of the implementation of
+ <classname>java.sql.Savepoint</classname>, Connector/J 3.1.0
+ and newer will not run on JDKs older than 1.4 unless the class
+ verifier is turned off (<option>-Xverify:none</option>), as
+ the class verifier will try to load the class definition for
+ <classname>java.sql.Savepoint</classname> even though it is
+ not accessed by the driver unless you actually use savepoint
+ functionality.
</para>
<para>
@@ -939,11 +942,15 @@
first available in JDK-1.4.0.
</para>
+ <remark>
+ MARKUP DONE TO HERE
+ </remark>
+
</section>
<section id="cj-supported-mysql-versions">
- <title>MySQL Server Version Guidelines</title>
+ <title>&title-cj-supported-mysql-versions;</title>
<para>
MySQL Connector/J supports all known MySQL server versions.
@@ -971,7 +978,7 @@
<section id="cj-classpath">
- <title>Installing the Driver and Configuring the CLASSPATH</title>
+ <title>&title-cj-classpath;</title>
<para>
MySQL Connector/J is distributed as a .zip or .tar.gz archive
@@ -1126,7 +1133,7 @@
<section id="cj-upgrading">
- <title>Upgrading from an Older Version</title>
+ <title>&title-cj-upgrading;</title>
<para>
MySQL AB tries to keep the upgrade process as easy as possible,
@@ -1144,7 +1151,7 @@
<section id="cj-upgrading-3-0-to-3-1">
- <title>Upgrading from MySQL Connector/J 3.0 to 3.1</title>
+ <title>&title-cj-upgrading-3-0-to-3-1;</title>
<para>
Connector/J 3.1 is designed to be backward-compatible with
@@ -1305,7 +1312,7 @@
<section id="cj-jdbc-upgrading-issues">
- <title>JDBC-Specific Issues When Upgrading to MySQL Server 4.1 or Newer</title>
+ <title>&title-cj-jdbc-upgrading-issues;</title>
<itemizedlist>
@@ -1360,14 +1367,13 @@
<section id="cj-jdbc-reference">
- <title>JDBC Reference</title>
+ <title>&title-cj-jdbc-reference;</title>
<para></para>
<section id="cj-configuration-properties">
- <title>Driver/Datasource Class Names, URL Syntax and Configuration Properties
- for Connector/J</title>
+ <title>&title-cj-configuration-properties;</title>
<para>
The name of the class that implements java.sql.Driver in MySQL
@@ -1395,13 +1401,14 @@
<para>
If the database is not specified, the connection will be made
- with no 'current' database. In this case, you will need to
- either call the 'setCatalog()' method on the Connection instance
- or fully-specify table names using the database name (i.e.
- 'SELECT dbname.tablename.colname FROM dbname.tablename...') in
- your SQL. Not specifying the database to use upon connection is
- generally only useful when building tools that work with
- multiple databases, such as GUI database managers.
+ with no default database. In this case, you will need to either
+ call the <function>setCatalog()</function> method on the
+ Connection instance or fully-specify table names using the
+ database name (i.e. 'SELECT dbname.tablename.colname FROM
+ dbname.tablename...') in your SQL. Not specifying the database
+ to use upon connection is generally only useful when building
+ tools that work with multiple databases, such as GUI database
+ managers.
</para>
<para>
@@ -2494,7 +2501,7 @@
<section id="cj-implementation-notes">
- <title>JDBC API Implementation Notes</title>
+ <title>&title-cj-implementation-notes;</title>
<para>
MySQL Connector/J passes all of the tests in the
@@ -2578,14 +2585,15 @@
</para>
<para>
- Unlike older versions of MM.MySQL the 'isClosed()' method
- does not <quote>ping</quote> the server to determine if it
- is alive. In accordance with the JDBC specification, it only
- returns true if 'closed()' has been called on the
- connection. If you need to determine if the connection is
- still valid, you should issue a simple query, such as
- "SELECT 1". The driver will throw an exception if the
- connection is no longer valid.
+ Unlike older versions of MM.MySQL the
+ <function>isClosed()</function> method does not
+ <quote>ping</quote> the server to determine if it is alive.
+ In accordance with the JDBC specification, it only returns
+ true if 'closed()' has been called on the connection. If you
+ need to determine if the connection is still valid, you
+ should issue a simple query, such as "SELECT 1". The driver
+ will throw an exception if the connection is no longer
+ valid.
</para>
</listitem>
@@ -2790,7 +2798,7 @@
<section id="cj-type-conversions">
- <title>Java, JDBC and MySQL Types</title>
+ <title>&title-cj-type-conversions;</title>
<para>
MySQL Connector/J is flexible in the way it handles conversions
@@ -3027,7 +3035,7 @@
<section id="cj-character-sets">
- <title>Using Character Sets and Unicode</title>
+ <title>&title-cj-character-sets;</title>
<para>
All strings sent from the JDBC driver to the server are
@@ -3300,7 +3308,7 @@
<!--
<section id="cj-usage-advisor">
- <title>Using the Usage Advisor</title>
+ <title>&title-cj-usage-advisor;</title>
<para></para>
</section>
@@ -3308,7 +3316,7 @@
<section id="cj-using-ssl">
- <title>Connecting Securely Using SSL</title>
+ <title>&title-cj-using-ssl;</title>
<para>
SSL in MySQL Connector/J encrypts all data (other than the
@@ -3497,7 +3505,7 @@
<section id="cj-replication-connection">
- <title>Using Master/Slave Replication with ReplicationConnection</title>
+ <title>&title-cj-replication-connection;</title>
<para>
Starting with Connector/J 3.1.7, we've made available a variant
@@ -3606,7 +3614,7 @@
<section id="cj-j2ee">
- <title>Using Connector/J with J2EE and Other Java Frameworks</title>
+ <title>&title-cj-j2ee;</title>
<para>
This section describes how to use Connector/J in several contexts.
@@ -3614,7 +3622,7 @@
<section id="cj-general-j2ee-concepts">
- <title>General J2EE Concepts</title>
+ <title>&title-cj-general-j2ee-concepts;</title>
<para>
This section provides general background on J2EE concepts that
@@ -3623,7 +3631,7 @@
<section id="cj-connection-pooling">
- <title>Understanding Connection Pooling</title>
+ <title>&title-cj-connection-pooling;</title>
<para>
Connection pooling is a technique of creating and managing a
@@ -3892,7 +3900,7 @@
<!--
<section id="cj-understanding-transactions">
- <title>Understanding Transactions</title>
+ <title>&title-cj-understanding-transactions;</title>
<para />
</section>
@@ -3902,7 +3910,7 @@
<section id="cj-tomcat-config">
- <title>Using Connector/J with Tomcat</title>
+ <title>&title-cj-tomcat-config;</title>
<para>
The following instructions are based on the instructions for
@@ -4066,7 +4074,7 @@
<section id="cj-jboss-config">
- <title>Using Connector/J with JBoss</title>
+ <title>&title-cj-jboss-config;</title>
<para>
These instructions cover JBoss-4.x. To make the JDBC driver
@@ -4121,7 +4129,7 @@
<!--
<section id="cj-hibernate-config">
- <title>Using Connector/J with Hibernate</title>
+ <title>&title-cj-hibernate-config;</title>
<para></para>
</section>
@@ -4129,7 +4137,7 @@
<!--
<section id="cj-spring-config">
- <title>Using Connector/J with Spring</title>
+ <title>&title-cj-spring-config;</title>
<para />
</section>
@@ -4137,7 +4145,7 @@
<!--
<section id="cj-struts-config">
- <title>Using Connector/J with Struts</title>
+ <title>&title-cj-struts-config;</title>
<para />
</section>
@@ -4146,7 +4154,7 @@
<!--
<section id="cj-weblogic-config">
- <title>Using Connector/J with BEA WebLogic</title>
+ <title>&title-cj-weblogic-config;</title>
<para />
</section>
@@ -4154,7 +4162,7 @@
<!--
<section id="cj-websphere-config">
- <title>Using Connector/J with IBM WebSphere</title>
+ <title>&title-cj-websphere-config;</title>
<para />
</section>
@@ -4162,7 +4170,7 @@
<!--
<section id="cj-ias-config">
- <title>Using Connector/J with Oracle Application Server</title>
+ <title>&title-cj-ias-config;</title>
<para />
</section>
@@ -4172,7 +4180,7 @@
<section id="cj-troubleshooting">
- <title>Diagnosing Connector/J Problems</title>
+ <title>&title-cj-troubleshooting;</title>
<para>
This section describes how to solve problems that you may
@@ -4181,7 +4189,7 @@
<section id="cj-faq">
- <title>Common Problems and Solutions</title>
+ <title>&title-cj-faq;</title>
<para>
There are a few issues that seem to be commonly encountered
@@ -4580,7 +4588,7 @@
<!--
<section id="cj-tracing">
- <title>Enabling Tracing Options</title>
+ <title>&title-cj-tracing;</title>
<para></para>
</section>
@@ -4588,7 +4596,7 @@
<section id="cj-reporting-bugs">
- <title>How to Report Bugs or Problems</title>
+ <title>&title-cj-reporting-bugs;</title>
<para>
The normal place to report bugs is
@@ -4699,7 +4707,7 @@
<para>
In the <methodname>runTest</methodname> () method, create code
that demonstrates the bug using the tables and data you created
- in the 'setUp' method.
+ in the <function>setUp</function> method.
</para>
<para>
Modified: trunk/refman-5.1/connector-j.xml
===================================================================
--- trunk/refman-5.1/connector-j.xml 2006-01-06 23:10:10 UTC (rev 713)
+++ trunk/refman-5.1/connector-j.xml 2006-01-07 01:05:13 UTC (rev 714)
@@ -95,7 +95,7 @@
<para>
The <literal>DriverManager</literal> needs to be told which JDBC
drivers it should try to make Connections with. The easiest way
- to do this is to use <literal>Class.forName()</literal> on the
+ to do this is to use <function>Class.forName()</function> on the
class that implements the <literal>java.sql.Driver</literal>
interface. With MySQL Connector/J, the name of this class is
<literal>com.mysql.jdbc.Driver</literal>. With this method, you
@@ -106,7 +106,7 @@
<para>
The following section of Java code shows how you might register
- MySQL Connector/J from the <literal>main()</literal> method of
+ MySQL Connector/J from the <function>main()</function> method of
your application:
</para>
@@ -134,7 +134,7 @@
<literal>DriverManager</literal>, you can obtain a
<literal>Connection</literal> instance that is connected to a
particular database by calling
- <literal>DriverManager.getConnection()</literal>:
+ <function>DriverManager.getConnection()</function>:
</para>
<example>
@@ -145,9 +145,9 @@
This example shows how you can obtain a
<literal>Connection</literal> instance from the
<literal>DriverManager</literal>. There are a few different
- signatures for the <literal>getConnection()</literal> method.
- You should see the API documentation that comes with your JDK
- for more specific information on how to use them.
+ signatures for the <function>getConnection()</function>
+ method. You should see the API documentation that comes with
+ your JDK for more specific information on how to use them.
</para>
<programlisting>
@@ -170,9 +170,9 @@
</programlisting>
<para>
- Once a <literal>Connection</literal> is established, it can be
- used to create <literal>Statement</literal> and
- <literal>PreparedStatement</literal> objects, as well as
+ Once a <classname>Connection</classname> is established, it
+ can be used to create <classname>Statement</classname> and
+ <classname>PreparedStatement</classname> objects, as well as
retrieve metadata about the database. This is explained in the
following sections.
</para>
@@ -191,7 +191,7 @@
<!--
<section id="cj-controlling-transactions">
- <title>Controlling transactions</title>
+ <title>&title-cj-controlling-transactions;</title>
<para />
</section>
@@ -199,32 +199,32 @@
<section id="cj-using-statements">
- <title>Using Statements to Execute SQL</title>
+ <title>&title-cj-using-statements;</title>
<para>
- <literal>Statement</literal> objects allow you to execute basic
- SQL queries and retrieve the results through the
+ <classname>Statement</classname> objects allow you to execute
+ basic SQL queries and retrieve the results through the
<literal>ResultSet</literal> class which is described later.
</para>
<para>
- To create a <literal>Statement</literal> instance, you call the
- <literal>createStatement()</literal> method on the
+ To create a <classname>Statement</classname> instance, you call
+ the <function>createStatement()</function> method on the
<literal>Connection</literal> object you have retrieved via one
- of the <literal>DriverManager.getConnection()</literal> or
- <literal>DataSource.getConnection()</literal> methods described
- earlier.
+ of the <function>DriverManager.getConnection()</function> or
+ <function>DataSource.getConnection()</function> methods
+ described earlier.
</para>
<para>
- Once you have a <literal>Statement</literal> instance, you can
- execute a <literal>SELECT</literal> query by calling the
+ Once you have a <classname>Statement</classname> instance, you
+ can execute a <literal>SELECT</literal> query by calling the
<literal>executeQuery(String)</literal> method with the SQL you
want to use.
</para>
<para>
- To update data in the database use the
+ To update data in the database, use the
<literal>executeUpdate(String SQL)</literal> method. This method
returns the number of rows affected by the update statement.
</para>
@@ -239,12 +239,12 @@
<literal>UPDATE</literal>, <literal>INSERT</literal>, or
<literal>DELETE</literal> statement. If the statement was a
<literal>SELECT</literal> query, you can retrieve the results by
- calling the <literal>getResultSet()</literal> method. If the
+ calling the <function>getResultSet()</function> method. If the
statement was an <literal>UPDATE</literal>,
<literal>INSERT</literal>, or <literal>DELETE</literal>
statement, you can retrieve the affected rows count by calling
- <literal>getUpdateCount()</literal> on the
- <literal>Statement</literal> instance.
+ <function>getUpdateCount()</function> on the
+ <classname>Statement</classname> instance.
</para>
<example>
@@ -296,7 +296,7 @@
<!--
<section id="cj-using-prepared-statements">
- <title>Using PreparedStatements to Execute SQL</title>
+ <title>&title-cj-using-prepared-statements;</title>
<para />
</section>
@@ -304,7 +304,7 @@
<section id="cj-using-callable-statements">
- <title>Using CallableStatements to Execute Stored Procedures</title>
+ <title>&title-cj-using-callable-statements;</title>
<para>
Starting with MySQL server version 5.0 when used with
@@ -328,16 +328,10 @@
<para>
The following example shows a stored procedure that returns the
- value of
+ value of <varname>inOutParam</varname> incremented by 1, and the
+ string passed in via <varname>inputParam</varname> as a
+ <classname>ResultSet</classname>:
- <varname>inOutParam</varname>
-
- incremented by 1, and the string passed in via
-
- <varname>inputParam</varname>
-
- as a <classname>ResultSet</classname>:
-
<example>
<title>Stored Procedure Example</title>
@@ -377,7 +371,7 @@
<example>
- <title>Using Connection.prepareCall()</title>
+ <title>Using <function>Connection.prepareCall()</function></title>
<programlisting>import java.sql.CallableStatement;
@@ -484,7 +478,7 @@
<example>
- <title>Setting CallableStatement Input Parameters</title>
+ <title>Setting <literal>CallableStatement</literal> Input Parameters</title>
<programlisting>...
@@ -529,12 +523,12 @@
<para>
Although <classname>CallableStatement</classname> supports
calling any of the <classname>Statement</classname> execute
- methods ( <function>executeUpdate()</function>,
+ methods (<function>executeUpdate()</function>,
<function>executeQuery()</function> or
- <function>execute()</function> ), the most flexible method
- to call is <function>execute()</function>, as you do not
- need to know ahead of time if the stored procedure returns
- result sets:
+ <function>execute()</function>), the most flexible method to
+ call is <function>execute()</function>, as you do not need
+ to know ahead of time if the stored procedure returns result
+ sets:
<example>
@@ -580,32 +574,38 @@
<section id="cj-retrieve-autoinc">
- <title>Retrieving AUTO_INCREMENT Column Values</title>
+ <title>&title-cj-retrieve-autoinc;</title>
<para>
Before version 3.0 of the JDBC API, there was no standard way of
- retrieving key values from databases that supported 'auto
- increment' or identity columns. With older JDBC drivers for
- MySQL, you could always use a MySQL- specific method on the
- Statement interface, or issue the query 'SELECT
- LAST_INSERT_ID()' after issuing an 'INSERT' to a table that had
- an AUTO_INCREMENT key. Using the MySQL-specific method call
- isn't portable, and issuing a 'SELECT' to get the AUTO_INCREMENT
- key's value requires another round- trip to the database, which
- isn't as efficient as possible. The following code snippets
- demonstrate the three different ways to retrieve AUTO_INCREMENT
+ retrieving key values from databases that supported <quote>auto
+ increment</quote> or identity columns. With older JDBC drivers
+ for MySQL, you could always use a MySQL-specific method on the
+ <classname>Statement</classname> interface, or issue the query
+ <literal>SELECT LAST_INSERT_ID()</literal> after issuing an
+ <literal>INSERT</literal> to a table that had an
+ <literal>AUTO_INCREMENT</literal> key. Using the MySQL-specific
+ method call isn't portable, and issuing a
+ <literal>SELECT</literal> to get the
+ <literal>AUTO_INCREMENT</literal> key's value requires another
+ round-trip to the database, which isn't as efficient as
+ possible. The following code snippets demonstrate the three
+ different ways to retrieve <literal>AUTO_INCREMENT</literal>
values. First, we demonstrate the use of the new JDBC-3.0 method
- 'getGeneratedKeys()' which is now the preferred method to use if
- you need to retrieve AUTO_INCREMENT keys and have access to
+ <function>getGeneratedKeys()</function> which is now the
+ preferred method to use if you need to retrieve
+ <literal>AUTO_INCREMENT</literal> keys and have access to
JDBC-3.0. The second example shows how you can retrieve the same
- value using a standard 'SELECT LAST_INSERT_ID()' query. The
- final example shows how updatable result sets can retrieve the
- AUTO_INCREMENT value when using the method 'insertRow()'.
+ value using a standard <literal>SELECT
+ LAST_INSERT_ID()</literal> query. The final example shows how
+ updatable result sets can retrieve the
+ <literal>AUTO_INCREMENT</literal> value when using the
+ <function>insertRow()</function> method.
<example>
- <title>Retrieving AUTO_INCREMENT Column Values using
- Statement.getGeneratedKeys()</title>
+ <title>Retrieving <literal>AUTO_INCREMENT</literal> Column Values using
+ <function>Statement.getGeneratedKeys()</function></title>
<programlisting> Statement stmt = null;
ResultSet rs = null;
@@ -688,7 +688,8 @@
<example>
- <title>Retrieving AUTO_INCREMENT Column Values using 'SELECT LAST_INSERT_ID()'</title>
+ <title>Retrieving <literal>AUTO_INCREMENT</literal> Column Values using
+ <function>SELECT LAST_INSERT_ID()</function></title>
<programlisting> Statement stmt = null;
ResultSet rs = null;
@@ -763,7 +764,8 @@
<example>
- <title>Retrieving AUTO_INCREMENT Column Values in Updatable ResultSets</title>
+ <title>Retrieving <literal>AUTO_INCREMENT</literal> Column Values in
+ <literal>Updatable ResultSets</literal></title>
<programlisting> Statement stmt = null;
ResultSet rs = null;
@@ -846,25 +848,26 @@
</example>
- When you run the example code above, you should get the
- following output: Key returned from getGeneratedKeys(): 1 Key
- returned from 'SELECT LAST_INSERT_ID()': 1 Key returned for
+ When you run the preceding example code, you should get the
+ following output: Key returned from
+ <function>getGeneratedKeys()</function>: 1 Key returned from
+ <literal>SELECT LAST_INSERT_ID()</literal>: 1 Key returned for
inserted row: 2 You should be aware, that at times, it can be
- tricky to use the 'SELECT LAST_INSERT_ID()' query, as that
- function's value is scoped to a connection. So, if some other
- query happens on the same connection, the value will be
- overwritten. On the other hand, the 'getGeneratedKeys()' method
- is scoped by the Statement instance, so it can be used even if
- other queries happen on the same connection, but not on the same
- Statement instance.
+ tricky to use the <literal>SELECT LAST_INSERT_ID()</literal>
+ query, as that function's value is scoped to a connection. So,
+ if some other query happens on the same connection, the value
+ will be overwritten. On the other hand, the
+ <function>getGeneratedKeys()</function> method is scoped by the
+ <classname>Statement</classname> instance, so it can be used
+ even if other queries happen on the same connection, but not on
+ the same <classname>Statement</classname> instance.
</para>
</section>
<!--
<section id="cj-retrieve-multiresults">
- <title>Retrieving Multiple ResultSets from a Statement or
- CallableStatement</title>
+ <title>&title-cj-retrieve-multiresults;</title>
<para />
</section>
@@ -872,8 +875,7 @@
<!--
<section id="cj-using-result-set-metadata">
- <title>Using ResultSetMetaData to Retrieve Information about a
- ResultSet</title>
+ <title>&title-cj-using-result-set-metadata;</title>
<para />
</section>
@@ -881,8 +883,7 @@
<!--
<section id="cj-using-database-metadata">
- <title>Using DatabaseMetaData to Retrieve Information about a
- Database</title>
+ <title>&title-cj-using-database-metadata;</title>
<para />
</section>
@@ -890,7 +891,7 @@
<!--
<section id="cj-working-with-lobs">
- <title>Working with BLOBs and CLOBs</title>
+ <title>&title-cj-working-with-lobs;</title>
<para />
</section>
@@ -924,12 +925,14 @@
</para>
<para>
- Because of the implementation of java.sql.Savepoint,
- Connector/J 3.1.0 and newer will not run on JDKs older than
- 1.4 unless the class verifier is turned off (-Xverify:none),
- as the class verifier will try to load the class definition
- for java.sql.Savepoint even though it is not accessed by the
- driver unless you actually use savepoint functionality.
+ Because of the implementation of
+ <classname>java.sql.Savepoint</classname>, Connector/J 3.1.0
+ and newer will not run on JDKs older than 1.4 unless the class
+ verifier is turned off (<option>-Xverify:none</option>), as
+ the class verifier will try to load the class definition for
+ <classname>java.sql.Savepoint</classname> even though it is
+ not accessed by the driver unless you actually use savepoint
+ functionality.
</para>
<para>
@@ -939,11 +942,15 @@
first available in JDK-1.4.0.
</para>
+ <remark>
+ MARKUP DONE TO HERE
+ </remark>
+
</section>
<section id="cj-supported-mysql-versions">
- <title>MySQL Server Version Guidelines</title>
+ <title>&title-cj-supported-mysql-versions;</title>
<para>
MySQL Connector/J supports all known MySQL server versions.
@@ -971,7 +978,7 @@
<section id="cj-classpath">
- <title>Installing the Driver and Configuring the CLASSPATH</title>
+ <title>&title-cj-classpath;</title>
<para>
MySQL Connector/J is distributed as a .zip or .tar.gz archive
@@ -1126,7 +1133,7 @@
<section id="cj-upgrading">
- <title>Upgrading from an Older Version</title>
+ <title>&title-cj-upgrading;</title>
<para>
MySQL AB tries to keep the upgrade process as easy as possible,
@@ -1144,7 +1151,7 @@
<section id="cj-upgrading-3-0-to-3-1">
- <title>Upgrading from MySQL Connector/J 3.0 to 3.1</title>
+ <title>&title-cj-upgrading-3-0-to-3-1;</title>
<para>
Connector/J 3.1 is designed to be backward-compatible with
@@ -1305,7 +1312,7 @@
<section id="cj-jdbc-upgrading-issues">
- <title>JDBC-Specific Issues When Upgrading to MySQL Server 4.1 or Newer</title>
+ <title>&title-cj-jdbc-upgrading-issues;</title>
<itemizedlist>
@@ -1360,14 +1367,13 @@
<section id="cj-jdbc-reference">
- <title>JDBC Reference</title>
+ <title>&title-cj-jdbc-reference;</title>
<para></para>
<section id="cj-configuration-properties">
- <title>Driver/Datasource Class Names, URL Syntax and Configuration Properties
- for Connector/J</title>
+ <title>&title-cj-configuration-properties;</title>
<para>
The name of the class that implements java.sql.Driver in MySQL
@@ -1395,13 +1401,14 @@
<para>
If the database is not specified, the connection will be made
- with no 'current' database. In this case, you will need to
- either call the 'setCatalog()' method on the Connection instance
- or fully-specify table names using the database name (i.e.
- 'SELECT dbname.tablename.colname FROM dbname.tablename...') in
- your SQL. Not specifying the database to use upon connection is
- generally only useful when building tools that work with
- multiple databases, such as GUI database managers.
+ with no default database. In this case, you will need to either
+ call the <function>setCatalog()</function> method on the
+ Connection instance or fully-specify table names using the
+ database name (i.e. 'SELECT dbname.tablename.colname FROM
+ dbname.tablename...') in your SQL. Not specifying the database
+ to use upon connection is generally only useful when building
+ tools that work with multiple databases, such as GUI database
+ managers.
</para>
<para>
@@ -2494,7 +2501,7 @@
<section id="cj-implementation-notes">
- <title>JDBC API Implementation Notes</title>
+ <title>&title-cj-implementation-notes;</title>
<para>
MySQL Connector/J passes all of the tests in the
@@ -2578,14 +2585,15 @@
</para>
<para>
- Unlike older versions of MM.MySQL the 'isClosed()' method
- does not <quote>ping</quote> the server to determine if it
- is alive. In accordance with the JDBC specification, it only
- returns true if 'closed()' has been called on the
- connection. If you need to determine if the connection is
- still valid, you should issue a simple query, such as
- "SELECT 1". The driver will throw an exception if the
- connection is no longer valid.
+ Unlike older versions of MM.MySQL the
+ <function>isClosed()</function> method does not
+ <quote>ping</quote> the server to determine if it is alive.
+ In accordance with the JDBC specification, it only returns
+ true if 'closed()' has been called on the connection. If you
+ need to determine if the connection is still valid, you
+ should issue a simple query, such as "SELECT 1". The driver
+ will throw an exception if the connection is no longer
+ valid.
</para>
</listitem>
@@ -2790,7 +2798,7 @@
<section id="cj-type-conversions">
- <title>Java, JDBC and MySQL Types</title>
+ <title>&title-cj-type-conversions;</title>
<para>
MySQL Connector/J is flexible in the way it handles conversions
@@ -3027,7 +3035,7 @@
<section id="cj-character-sets">
- <title>Using Character Sets and Unicode</title>
+ <title>&title-cj-character-sets;</title>
<para>
All strings sent from the JDBC driver to the server are
@@ -3300,7 +3308,7 @@
<!--
<section id="cj-usage-advisor">
- <title>Using the Usage Advisor</title>
+ <title>&title-cj-usage-advisor;</title>
<para></para>
</section>
@@ -3308,7 +3316,7 @@
<section id="cj-using-ssl">
- <title>Connecting Securely Using SSL</title>
+ <title>&title-cj-using-ssl;</title>
<para>
SSL in MySQL Connector/J encrypts all data (other than the
@@ -3497,7 +3505,7 @@
<section id="cj-replication-connection">
- <title>Using Master/Slave Replication with ReplicationConnection</title>
+ <title>&title-cj-replication-connection;</title>
<para>
Starting with Connector/J 3.1.7, we've made available a variant
@@ -3606,7 +3614,7 @@
<section id="cj-j2ee">
- <title>Using Connector/J with J2EE and Other Java Frameworks</title>
+ <title>&title-cj-j2ee;</title>
<para>
This section describes how to use Connector/J in several contexts.
@@ -3614,7 +3622,7 @@
<section id="cj-general-j2ee-concepts">
- <title>General J2EE Concepts</title>
+ <title>&title-cj-general-j2ee-concepts;</title>
<para>
This section provides general background on J2EE concepts that
@@ -3623,7 +3631,7 @@
<section id="cj-connection-pooling">
- <title>Understanding Connection Pooling</title>
+ <title>&title-cj-connection-pooling;</title>
<para>
Connection pooling is a technique of creating and managing a
@@ -3892,7 +3900,7 @@
<!--
<section id="cj-understanding-transactions">
- <title>Understanding Transactions</title>
+ <title>&title-cj-understanding-transactions;</title>
<para />
</section>
@@ -3902,7 +3910,7 @@
<section id="cj-tomcat-config">
- <title>Using Connector/J with Tomcat</title>
+ <title>&title-cj-tomcat-config;</title>
<para>
The following instructions are based on the instructions for
@@ -4066,7 +4074,7 @@
<section id="cj-jboss-config">
- <title>Using Connector/J with JBoss</title>
+ <title>&title-cj-jboss-config;</title>
<para>
These instructions cover JBoss-4.x. To make the JDBC driver
@@ -4121,7 +4129,7 @@
<!--
<section id="cj-hibernate-config">
- <title>Using Connector/J with Hibernate</title>
+ <title>&title-cj-hibernate-config;</title>
<para></para>
</section>
@@ -4129,7 +4137,7 @@
<!--
<section id="cj-spring-config">
- <title>Using Connector/J with Spring</title>
+ <title>&title-cj-spring-config;</title>
<para />
</section>
@@ -4137,7 +4145,7 @@
<!--
<section id="cj-struts-config">
- <title>Using Connector/J with Struts</title>
+ <title>&title-cj-struts-config;</title>
<para />
</section>
@@ -4146,7 +4154,7 @@
<!--
<section id="cj-weblogic-config">
- <title>Using Connector/J with BEA WebLogic</title>
+ <title>&title-cj-weblogic-config;</title>
<para />
</section>
@@ -4154,7 +4162,7 @@
<!--
<section id="cj-websphere-config">
- <title>Using Connector/J with IBM WebSphere</title>
+ <title>&title-cj-websphere-config;</title>
<para />
</section>
@@ -4162,7 +4170,7 @@
<!--
<section id="cj-ias-config">
- <title>Using Connector/J with Oracle Application Server</title>
+ <title>&title-cj-ias-config;</title>
<para />
</section>
@@ -4172,7 +4180,7 @@
<section id="cj-troubleshooting">
- <title>Diagnosing Connector/J Problems</title>
+ <title>&title-cj-troubleshooting;</title>
<para>
This section describes how to solve problems that you may
@@ -4181,7 +4189,7 @@
<section id="cj-faq">
- <title>Common Problems and Solutions</title>
+ <title>&title-cj-faq;</title>
<para>
There are a few issues that seem to be commonly encountered
@@ -4580,7 +4588,7 @@
<!--
<section id="cj-tracing">
- <title>Enabling Tracing Options</title>
+ <title>&title-cj-tracing;</title>
<para></para>
</section>
@@ -4588,7 +4596,7 @@
<section id="cj-reporting-bugs">
- <title>How to Report Bugs or Problems</title>
+ <title>&title-cj-reporting-bugs;</title>
<para>
The normal place to report bugs is
@@ -4699,7 +4707,7 @@
<para>
In the <methodname>runTest</methodname> () method, create code
that demonstrates the bug using the tables and data you created
- in the 'setUp' method.
+ in the <function>setUp</function> method.
</para>
<para>
Modified: trunk/refman-common/titles.en.ent
===================================================================
--- trunk/refman-common/titles.en.ent 2006-01-06 23:10:10 UTC (rev 713)
+++ trunk/refman-common/titles.en.ent 2006-01-07 01:05:13 UTC (rev 714)
@@ -174,7 +174,7 @@
<!ENTITY title-cj-basic-jdbc "Basic JDBC concepts">
<!ENTITY title-cj-changelog "MySQL Connector/J Change History">
<!ENTITY title-cj-character-sets "Using Character Sets and Unicode">
-<!ENTITY title-cj-classpath "Installing the Driver and Configuring the CLASSPATH">
+<!ENTITY title-cj-classpath "Installing the Driver and Configuring the <literal>CLASSPATH</literal>">
<!ENTITY title-cj-configuration-properties "Driver/Datasource Class Names, URL Syntax and Configuration Properties for Connector/J">
<!ENTITY title-cj-connect-with-datasource "Connecting to MySQL using the <literal>DataSource</literal> Interface">
<!ENTITY title-cj-connect-with-drivermanager "Connecting to MySQL using the <literal>DriverManager</literal> Interface">
@@ -192,8 +192,8 @@
<!ENTITY title-cj-jdbc-upgrading-issues "JDBC-Specific Issues When Upgrading to MySQL Server 4.1 or Newer">
<!ENTITY title-cj-replication-connection "Using Master/Slave Replication with ReplicationConnection">
<!ENTITY title-cj-reporting-bugs "How to Report Connector/J Bugs or Problems">
-<!ENTITY title-cj-retrieve-autoinc "Retrieving AUTO_INCREMENT Column Values">
-<!ENTITY title-cj-retrieve-multiresults "Retrieving Multiple ResultSets from a Statement or CallableStatement">
+<!ENTITY title-cj-retrieve-autoinc "Retrieving <literal>AUTO_INCREMENT</literal> Column Values">
+<!ENTITY title-cj-retrieve-multiresults "Retrieving Multiple <literal>ResultSets</literal> from a <literal>Statement</literal> or <literal>CallableStatement</literal>">
<!ENTITY title-cj-spring-config "Using Connector/J with Spring">
<!ENTITY title-cj-struts-config "Using Connector/J with Struts">
<!ENTITY title-cj-supported-java-versions "Java Versions Supported">
@@ -207,15 +207,15 @@
<!ENTITY title-cj-upgrading "Upgrading from an Older Version">
<!ENTITY title-cj-upgrading-3-0-to-3-1 "Upgrading from MySQL Connector/J 3.0 to 3.1">
<!ENTITY title-cj-usage-advisor "Using the Usage Advisor">
-<!ENTITY title-cj-using-callable-statements "Using CallableStatements to Execute Stored Procedures">
-<!ENTITY title-cj-using-database-metadata "Using DatabaseMetaData to Retrieve Information about a Database">
-<!ENTITY title-cj-using-prepared-statements "Using PreparedStatements to Execute SQL">
-<!ENTITY title-cj-using-result-set-metadata "Using ResultSetMetaData to Retrieve Information about a ResultSet">
+<!ENTITY title-cj-using-callable-statements "Using <literal>CallableStatements</literal> to Execute Stored Procedures">
+<!ENTITY title-cj-using-database-metadata "Using <literal>DatabaseMetaData</literal> to Retrieve Information about a Database">
+<!ENTITY title-cj-using-prepared-statements "Using <literal>PreparedStatements</literal> to Execute SQL">
+<!ENTITY title-cj-using-result-set-metadata "Using <literal>ResultSetMetaData</literal> to Retrieve Information about a <literal>ResultSet</literal>">
<!ENTITY title-cj-using-ssl "Connecting Securely Using SSL">
<!ENTITY title-cj-using-statements "Using Statements to Execute SQL">
<!ENTITY title-cj-weblogic-config "Using Connector/J with BEA WebLogic">
<!ENTITY title-cj-websphere-config "Using Connector/J with IBM WebSphere">
-<!ENTITY title-cj-working-with-lobs "Working with BLOBs and CLOBs">
+<!ENTITY title-cj-working-with-lobs "Working with <literal>BLOB</literal> and <literal>CLOB</literal> Values">
<!ENTITY title-client-side-overview "Overview of the Client-Side Scripts and Utilities">
<!ENTITY title-client-side-scripts "Client and Utility Programs">
<!ENTITY title-close "Cursor <literal>CLOSE</literal> Statement">
Modified: trunk/tools/xmlformat.conf
===================================================================
--- trunk/tools/xmlformat.conf 2006-01-06 23:10:10 UTC (rev 713)
+++ trunk/tools/xmlformat.conf 2006-01-07 01:05:13 UTC (rev 714)
@@ -85,7 +85,7 @@
guibutton guilabel guimenu guisubmenu guimenuitem \
quote superscript firstterm \
methodname classname property function phrase envar foreignphrase errortext \
-classname type
+classname type varname
format inline
# Begin each element on new line, indenting sub elements two spaces.
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r714 - in trunk: . refman-4.1 refman-5.0 refman-5.1 refman-common tools | paul | 7 Jan |