The JDBC Applet Server is a stand alone socket server application. To
activate the JDBC Applet Server, enter the following command:
This will activate the JDBC Applet Server listening on port . However,
we do not activate this function since the DB2 database is only accessed
through the WebSphere's servlet, not direct applet access. Creating a JDBC program
To create a Java program that accesses DB2 using JDBC, we need to
perform the following steps.
Importing the java.sql package
Creating a Java program to access DB2 via JDBC requires the following
import java.sql.*;
Registering the DB2 driver
We must then register the DB2 JDBC class. As mentioned in,  DB2
JDBC Drivers  on page 83, this can be one of two classes:
Use this driver if the DB2 CAE is installed on the client machine.
Use this driver if you do not wish to have the DB2 CAE installed on the
client machine.
The code to register the driver, assuming you would be using this Java class
with the native API driver, would be as follows:
try {
Class.forName( );
} catch (Exception e) {
Creating the DB2 connection
A connection to the DB2 database is created with the getConnection method
from the DriverManager class. For example, to connect to the userstuf
database (we assume database userstuf has been cataloged correctly on this
server), with the default userid and password, we would use the call method
as follows:
String url= jdbc:db2:userstuf 
Linux Web Hosting with WebSphere, DB2, and Domino



About Services Network Support FAQ Order Contact

Linux Web Hosting

Our partners:Jsp Web Hosting Unlimited Web Hosting Cheapest Web Hosting  Java Web Hosting Web Templates Best Web Templates PHP Mysql Web Hosting Interland Web Hosting Cheap Web Hosting PHP Web Hosting Tomcat Web Hosting Quality Web Hosting Best Web Hosting  Mac Web Hosting  Business web hosting division of Vision Web Hosting Inc. All rights reserved