File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


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

Chris Morrell
Greenhorn

Joined: Aug 10, 2005
Posts: 11
Hello. I am trying to connect to an access database on my company's web host. I have tried a number of possibilities without success. Here is what I'm trying right now:



Do I need to use a different driver? Is the connection string incorrect? Any ideas?

Thanks in advance for your help.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Moving to JDBC


[Jess in Action][AskingGoodQuestions]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61315
    
  66

"jdbc:odbc://<ip_address>;dsn=<dsn_name>;uid=<user_id>;pwd=<password>"


Is this the actual string that you used? You did substitute real values, didn't you?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

"jdbcdbc://<ip_address>;dsn=<dsn_name>;uid=<user_id>;pwd=<password>"

Nope. Your "ip_address" part is meaningless. If your database is "remote" then you'll need to configure the DSN appropriately. Whether this is possible or not depends on the ODBC driver; some can be configured for databases on other machines and others cannot. If your next question was going to be about MS Access, its driver is in the latter category. Unless you map a drive to its "remote" location, which makes it basically local.
[ October 23, 2005: Message edited by: Paul Clapham ]
 
GeeCON Prague 2014
 
subject: How to Connect to a Remote Database