Registering a JDBC driver
The sections of this online help file are: JDBC driver Registering a JDBC driver Deploying a JDBC driver
JDBC driver
To connect to a database server running on a remote host, the user needs a Java Database Connectivity (JDBC) driver installed on the client workstation.
The Z and I Emulator for Web client and the Database On-Demand client already include a JDBC driver from the AS/400 Toolbox for Java. This driver allows a client to access a DB2/400 database on a properly configured iSeries or AS/400 host system.
If you need a different JDBC driver:
- If you are a user, contact your administrator to obtain the driver.
- If you are a Z and I Emulator for Web administrator, contact the administrator of the remote database server to which you want users to connect.
Registering a JDBC driver
Registering a JDBC driver provides Z and I Emulator for Web with the information it needs to manage the driver, including:
- A name or description of the driver (such as
IBM DB2 UDB local
). Z and I Emulator for Web uses this name to refer to the driver when Z and I Emulator for Web displays a list of registered drivers. - The fully qualified Java package name of the driver. The Z and I Emulator for Web or Database On-Demand client uses this package name when calling Java methods in the driver.
The AS/400 Toolbox for Java driver does not need to be registered, because it is included with Z and I Emulator for Web.
The Z and I Emulator for Web administrator or Database On-Demand administrator can register a JDBC driver at the following locations in the user interface:
- Z and I Emulator for Web (HTML-based model, Configuration server-based model, and
Combined model):
- The Drivers pane of the Data Transfer Defaults window, accessible through the session window or the session properties window.
- Database On-Demand
- The Drivers pane of the Database On-Demand Group Options window or the Database On-Demand User Options window (see Database On-Demand Group/User Options).
The Z and I Emulator for Web user or Database On-Demand user can register a JDBC driver at the following locations in the user interface:
- Z and I Emulator for Web (HTML-based model, Configuration server-based model, and
Combined model):
- The Drivers pane of the Data Transfer Defaults user options window, accessible from the session window (see Data Transfer Defaults).
- Database On-Demand
- The Drivers pane of the Database On-Demand User Options window, accessible from the Database On-Demand desktop (see Database On-Demand User Options).
Deploying a JDBC driver
The fact that a driver has been registered (and therefore appears in a list of registered drivers) does not mean that the driver has also been deployed to the user's workstation.
Deploying a driver means copying the driver (which may consist of one file or a group of files) to the user's workstation, in a directory where the Z and I Emulator for Web or Database On-Demand client code can access it.
One way to make the driver accessible to Z and I Emulator for Web or Database On-Demand for Java 2 is to copy the JDBC driver archive file (or files, if there are multiple archive files in the driver) to the lib\ext directory of the Java 2 plug-in.