wood burning stoves 2.0*
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 Murach's Java Servlets and JSP this week in the Servlets 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: 15299
    
    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 - Experts at Building Test Data
 
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.
Looking up Datasource object from a stateless session bean in WSAD 5.0....
Connect to Oracle database
Oracle 7 and JDBC