AS/400 Toolbox for Java \
Access classes \ JDBC
JDBC
The AS/400 Toolbox for Java JDBC (Java Database Connectivity)
driver allows Java programs to access AS/400 database files using
standard JDBC interfaces. Use these standard JDBC interfaces to
issue SQL statements and process results. JDBC is a standard part
of Java and is included in JDK 1.1.
The AS/400 Toolbox for Java supports JDBC 2.0. If you want to
use any of the following JDBC 2.0 enhancements, you also need to
use JDK 1.2:
- Blob interface
- Clob interface
- Scrollable result set
- Updatable result set
- Batch update capability with Statement, PreparedStatement, and
CallableStatement objects
JDBC defines the following Java interfaces:
- The Driver interface creates the
connection and returns information about the driver version.
- The Connection interface represents a
connection to a specific database.
- The Statement interface runs SQL
statements and obtains the results.
- The PreparedStatement interface runs
compiled SQL statements.
- The CallableStatement interface runs
SQL stored procedures.
- The ResultSet interface provides
access to a table of data that is generated by running a SQL query
or DatabaseMetaData catalog method.
- The DatabaseMetaData interface
provides information about the database as a whole.
- The Blob interface provides access to
binary large objects (BLOBs).
- The Clob interface provides access to
character large objects (CLOBs).
We have included a table that lists JDBC
properties for easy reference.
Examples
Using the JDBC driver to create and populate a
table.
Using the JDBC driver to query a table and output its
contents.