Hi all,

Could anyone help me in this.
I am not able to connect to DB2 using this code in a servlet. However
the code works just fine in a java application.
Any hints ?


---------------------------------------------------------------------
   try {
    Class.forName("COM.ibm.db2.jdbc.app.DB2Driver").newInstance();
    }
    catch (Exception e) {
     e.printStackTrace();
     }
   }
   Connection con = null;
   String url="jdbc:db2:dbname";
   try
    {
     con = DriverManager.getConnection(url, "****","*****");
     Statement stmt = con.createStatement();
     .....
---------------------------------------------------------------------

Regards,
Nabil

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to