This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
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


Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
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
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: 24193
    
  34

Moving to JDBC


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

Joined: Jan 10, 2002
Posts: 63341
    
  70

"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
Sheriff

Joined: Oct 14, 2005
Posts: 19739
    
  10

"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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to Connect to a Remote Database
 
It's not a secret anymore!