Connector/J Examples
Examples of using Connector/J are located throughout this document. This section provides a summary and links to these examples.
- Example 20.1, "Connector/J: Obtaining a connection from the
DriverManager
" - Example 20.2, "Connector/J: Using java.sql.Statement to execute a
SELECT
query" - Example 20.3, "Connector/J: Calling Stored Procedures"
- Example 20.4, "Connector/J: Using
Connection.prepareCall()
" - Example 20.5, "Connector/J: Registering output parameters"
- Example 20.6, "Connector/J: Setting
CallableStatement
input parameters" - Example 20.7, "Connector/J: Retrieving results and output parameter values"
- Example 20.8, "Connector/J: Retrieving
AUTO_INCREMENT
column values usingStatement.getGeneratedKeys()
" - Example 20.9, "Connector/J: Retrieving
AUTO_INCREMENT
column values usingSELECT LAST_INSERT_ID()
" - Example 20.10, "Connector/J: Retrieving
AUTO_INCREMENT
column values inUpdatable ResultSets
" - Example 20.11, "Connector/J: Using a connection pool with a J2EE application server"
- Example 20.12, "Connector/J: Example of transaction with retry logic"