Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

can't connect to DB2 using jdbc (db2java.zip)

843854Dec 6 2002 — edited Jul 27 2006
i'm connecting to DB2 via JDBC
with the driver "COM.ibm.db2.jdbc.net.DB2Driver". here's the code:

System.out.println("gettting connection");
conn=DriverManager.getConnection("jdbc:db2://host:50005/dbName","user","password");
System.out.println("got connection");

i got the "getting connection" printed out but not the "got connection" and it just stays like that forever.

by the way what is "COM.ibm.db2.jdbc.app.DB2Driver" for? what are the differences?
i'm connecting to the remote host so that meands i need the "COM.ibm.db2.jdbc.net.DB2Driver"?

regards,
thanapong
ps. i'm using win2k while DB2 is running on AIX(unix)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 24 2006
Added on Dec 6 2002
7 comments
297 views