JDBC is an application programming interface (API) included in the Java platform that enables Java programs to connect to a wide range of databases.
The AS/400 Toolbox for Java JDBC driver allows you to use JDBC API interfaces to issue structured query language (SQL) statements to and process results from AS/400 databases. The server also has a JDBC driver that is optimized for use on the server.
When you
are running an application on the server, your application uses the server JDBC
driver by default. You can override this by using the driver
property.
Different
versions of the JDBC API exist, and the AS/400 Toolbox for Java JDBC driver
supports the following versions:
The table below lists the supported JDBC interfaces and the API required to use them:
Supported interface | API required |
---|---|
Blob provides access to binary large objects (BLOBs) | JDBC 2.1 core |
CallableStatement runs SQL stored procedures | JDK 1.1 |
Clob provides access to character large objects (CLOBs) | JDBC 2.1 core |
Connection represents a connection to a specific database | JDK 1.1 |
|
JDBC 2.0 Optional Package![]() |
DatabaseMetaData provides information about the database as a whole. | JDK 1.1 |
![]() |
JDBC 2.0 Optional Package |
Driver creates the connection and returns information about the driver version. | JDK 1.1 |
PreparedStatement runs compiled SQL statements | JDK 1.1 |
ResultSet provides access to a table of data that is generated by running a SQL query or DatabaseMetaData catalog method | JDK 1.1 |
ResultSetMetaData provides information about a specific ResultSet |
JDK 1.1 |
|
JDBC 2.0 Optional Package![]() |
Statement runs SQL statements and obtains the results | JDK 1.1 |
|
JDBC 2.0 Optional Package![]() |
![]() |
JDBC 2.0 Optional Package![]() |
We have included a table that lists JDBC properties for easy reference.
The following examples illustrate ways to use the AS/400 Toolbox for Java JDBC driver.
The standard
extension example includes registering objects by using a Java Naming and Directory
Interface (JNDI) service provider. For more information on JNDI service providers,
see AS/400 Toolbox for Java reference links.