File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases 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
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "how to connect to a remote database" Watch "how to connect to a remote database" New topic

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: 15302

If it's from a desktop or webapp type application, in the connection URL just provide the hostname/ip address instead of saying localhost/ 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:
subject: how to connect to a remote database
It's not a secret anymore!