I don't get an error message, the program just hangs at the last statement. There is no mistake in my dburl or dbport, cause I give a wrong url/port I get te fault "Error opening socket". But when I give the wrong dbname, user or password, still nothing happens, and then I mean nothing, de program just hangs.
If you find the jcc driver in the directory db2/jcc try, Class.forName("COM.ibm.db2.jcc.DB2Driver").newInstance(); instead of, Class.forName("COM.ibm.db2.jdbc.net.DB2Driver");
In DB2 8.1, this (jcc) new type 4 driver has been introduced.
Now the 'DriverManager.getConnection' statement works, but now the following statements don't work, although with the 'COM.ibm.db2.jdbc.net.DB2Driver'-driver, they work fine.