*
The moose likes Servlets and the fly likes connect remotely to database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Reply locked New topic
Author

connect remotely to database

sherif hathout
Greenhorn

Joined: Nov 02, 2004
Posts: 18
Dear/All
please, I want to connect remotely to acertain DB on a server using hostname and port number. please it's urgent.

this code throws a SQLException(No suitable driver)


Class.forName("COM.ibm.db2.jdbc.app.DB2Driver");
Connection con = DriverManager.getConnection("jdbc b2://host:50002/DBname", "user", "password");
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61095
    
  66

Duplicate of this post.

Please do not cross-post the same question in multiple forums.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
jQuery in Action, 2nd edition
 
subject: connect remotely to database