• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Connecting to a remote host

 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
[email protected]
Regards,
Murthy
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic