This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 60041
    
  65

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]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: connect remotely to database
 
Similar Threads
VPN service
Uncommon Exception
JBoss and WMQ 7 JCA connection issue
how to post picture
Naming Exception - Error accessing repository