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 JDBC and the fly likes how to connect to a remote 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 » Databases » JDBC
Bookmark "how to connect to a remote database" Watch "how to connect to a remote database" New topic
Author

how to connect to a remote database

Dharmesh Gangani
Ranch Hand

Joined: Feb 20, 2004
Posts: 30
Guys... anybody can help me on this...
I need to write a class which can connect to an (oracle) database (remote / local).
For the local database, i dont have a problem. But how do i connect to oracle db residing on a remote server.
Any help will be appertiated.
[ February 20, 2004: Message edited by: Dharmesh Gangani ]

-=-=-=-=-=-=-=-=-=-<br />Thanks & Regards,<br />Dharmesh G.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

If it's from a desktop or webapp type application, in the connection URL just provide the hostname/ip address instead of saying localhost/127.0.0.1. Nothing else should change.
If you are trying to do this from an Applet it becomes more difficult.


GenRocket - A Test Data Generation Platform
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to connect to a remote database
 
Similar Threads
local and remote client run
Re: Connecting to an orcle data base. EJB with BMP.
Connect to Oracle database
Looking up Datasource object from a stateless session bean in WSAD 5.0....
Oracle 7 and JDBC