This is the error I get.
com.ibm.db2.jcc.c.SQLException: Failure in loading T2 native library db2jcct2
at com.ibm.db2.jcc.t2.a.a(a.java:31)
at com.ibm.db2.jcc.t2.T2Configuration.<clinit>(T2Configuration.java:40)
I have
db2java.zip
db2jcc.jar
in my class path, is there a DLL missing or what do I have to do to allow me to use this driver?
Thanks ...
public static Connection setUpConnectionToDB( String url, String user, String pwd){
//url = "jdbc:db2:VUMSTMEL"
System.out.println("connecting to Database using " + url);
Connection c = null;
try{
Class.forName("com.ibm.db2.jcc.DB2Driver");
// establish a connection to DB2
c = DriverManager.getConnection(url,user,pwd);
}
catch(ClassNotFoundException e){
JOptionPane.showMessageDialog(null , "Class not found");
System.exit(0);
}
catch(SQLException e){
e.printStackTrace();
JOptionPane.showMessageDialog(null , "SQL Exception");
System.exit(0);
}
catch(Exception e){
JOptionPane.showMessageDialog(null , "Error connecting to DB, check config file" + e.getClass());
System.exit(0);
}
System.out.println("connected to Database");
return c;
}