*
The moose likes JDBC and the fly likes Connecting to a remote host 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 "Connecting to a remote host" Watch "Connecting to a remote host" New topic
Author

Connecting to a remote host

cardwell cupp
Ranch Hand

Joined: Aug 16, 2001
Posts: 66
I am working with a project that is able to transfer databases to various work stations. Right now, I can connect easily to a database that is on the same workstation. Now I would like to connect to a host that is not on the network. I have researched the documentation on the formation of the url..and here is what I found.
url should be something like:
jdbc dbc://hostname ort/subsubname
(assuming that the driver name is odbc)
so that is how I format the url string...but the only problem is that I get an exception:
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified has occurred during connection
I am not sure what else to try. I have also looked into creating a System DSN to the host. But when looking in the ODBC Data Sources tool, I can't see any way to make a DSN to a host that is not on the server...
Am I forming the url wrong...if so what should it be. If not, what else could be the problem
Thanks
Cardwell
asnmurthy
Greenhorn

Joined: Aug 01, 2000
Posts: 7
Hi, if you are bale to connect to the other databases from your machine using sqlplus, then you should be able to connect to those databases by crating a DSN in using ODBC datasources in control panel. If you can send me your code, I can solve your problem. I think the URL which you gave, is not in the proper format.
if you are going to use jdbc dbc bridge, then the syntax would be like this.
Connection con = DriverManager.getconnection("jdbc dbc:yourdatasourcename","userid","password");
I hope this would help you otherwise send me an email to
A.Murthy@gecapital.com
Regards,
Murthy


Thanks & Regards,<br />Murthy
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connecting to a remote host
 
Similar Threads
jdbc:odbc with DSN less connection for MS Access
ODBC Driver Manager
How to set up a DSN?
dynamic creation of Data Source Name(DSN) programatically , help needed urgent
JDBC:ODBC: DRIVINGMECRAZY