GeeCON Prague 2014*
The moose likes JDBC and the fly likes connection to Access on another machine. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Bookmark "connection to Access on another machine." Watch "connection to Access on another machine." New topic
Author

connection to Access on another machine.

carl varola
Ranch Hand

Joined: May 16, 2002
Posts: 59
All,
I'm trying to connect to an access data base on my machine first and then on access data base on another machine .
The following code is NOT working :
Connection con=DriverManager.getConnection("jdbc dbc://localhost:1114/database1","","");
i have register that database as data source.
i got the following error message:
------------------------------------
[Microsoft][ODBC Driver Manager] Data source name not found and no default
driver specified
-------------------------------------
also what do i need more than just typing the ip addresss instead of localhost to connect to another database on another machine?.
thanks.
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

from what i understand, Access is just a souped up file. There are no listeners, ports, etc. So you can't remotely connect to it. If it resides on a computer that is on your network, then you should be able to set up a 'System DSN' to point to the location of the remote Access DB. Another option is to use the RMI JDBC which allows you to remotely access MSAccess and MSSQL Server databases.
see here for more info.
Jamie
 
GeeCON Prague 2014
 
subject: connection to Access on another machine.