174 iSeries Access for Web V5R2 and WebSphere Host Publisher V4.0
The SQL statement types are:
After Database Access guides you through creating an Integration Object, use the Application
Integrator application to create a Web page where the data will appear.
6.4.2 Sample scenario
The Host Publisher Studio Database Access allows you to connect to a database to create
and generate a database Integration Object. It is also used to define the database connection
and connection pools if required by your application.
This section shows you a sample scenario in which we connect to the DB2 UDB for iSeries
database provided by iSeries. We choose in the IBM WebSphere Host Publisher Studio the
IBM Toolbox for Java JDBC Driver, from the pull-down menu, to access to the DB2 UDB for
iSeries database. This driver, com.ibm.as400.access.AS400JDBCDriver, has to be known at
the classpath from your PC. If you don’t have it already on your PC, copy it from your iSeries.
You can find it in the directory /QIBM/ProdData/OS400/jt400/lib/. The JAR file is called
Step 1: Connecting to the database
Before you attempt to create the database Integration Object, you are required to connect to
the database. After you start Studio Database Access, you enter the required information to
establish this connection, as shown in Figure 6-31.
Specify the JDBC URL for the database. The format of the database URL depends on the
JDBC driver you use to connect to the database.
If you select one of the JDBC drivers from the drop-down list in the Driver field, the required
format for the driver is displayed in the Database URL field. For example, the AS/400 (IBM)
Toolbox for Java JDBC driver requires jdbc:as400://
is the fully-qualified
network name of the database host.
The connection is specified with a URL format, for example:
Note the following explanation:
is the driver name (for example, as400, db2, oracle, odbc, and so forth).
is the system name, default schema, and properties (for example
Note: When a database query (such as select) is made and the field is empty, the
database returns a value of null. As a result, the Host Publisher database Integration
Object returns a value of null to the invoker. By default, JSP pages generated in Application
Integrator display null values as “null” — not as a string of blanks. If you prefer that null
values appear as blanks, you need to modify the JSP pages so that the null values are
displayed as blanks.