db_drvr

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 Host On-Demand 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 Host On-Demand 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 Host On-Demand with the information it needs to manage the driver, including:

  • A name or description of the driver (such as
    IBM DB2 UDB
                                local
    ). Host On-Demand uses this name to refer to the driver when Host On-Demand displays a list of registered drivers.
  • The fully qualified Java package name of the driver. The Host On-Demand 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 Host On-Demand.

The Host On-Demand administrator or Database On-Demand administrator can register a JDBC driver at the following locations in the user interface:

  • Host On-Demand (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 Host On-Demand user or Database On-Demand user can register a JDBC driver at the following locations in the user interface:

  • Host On-Demand (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

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 Host On-Demand or Database On-Demand client code can access it.

One way to make the driver accessible to Host On-Demand 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.

For example, if the user is using the IBM Java 2 plug-in on a Windows platform, the complete path of the lib\ext subdirectory could be:

c:\Program Files\IBM\Java141\jre\lib\ext