| Author |
Can I use jdbc:odbc to access MS Access database remotely?
|
Bruce Jin
Ranch Hand
Joined: Sep 20, 2001
Posts: 666
|
|
My java runs on one PC and I want to access MS Access database on another PC using sun.jdbc.odbc.JdbcOdbcDriver driver. Is this possible? Can I do this? connection = DriverManager.getConnection(jdbc dbc://111.222.333.444/databasename); Thanks.
|
BJ - SCJP and SCWCD
We love Java programming. It is contagious, very cool, and lot of fun. - Peter Coad, Java Design
Crazy Bikes created by m-Power
|
 |
Sam Moran
Ranch Hand
Joined: Sep 28, 2002
Posts: 86
|
|
I have a mapped drive on my PC to a server in our server room. I set up my DSN file so that it uses the mapped drive to get to the DB and then I just connect to the DB using the DSN name in the Java program. I hope this helps! Below, BCMSDB is the USER DSN that I setup in NT DBC Connection Data Sources! It contains the information about the mapping.
|
We make a living by what we get, we make a life by what we give!
|
 |
Jamie Robertson
Ranch Hand
Joined: Jul 09, 2001
Posts: 1879
|
|
|
I believe you can also accomplish this by setting up a System DSN instead of a User DSN in your ODBC datasources.
|
 |
Sam Moran
Ranch Hand
Joined: Sep 28, 2002
Posts: 86
|
|
Yes, you can set this up in either User or System DSN. System would probably be a better choice.
|
 |
Bruce Jin
Ranch Hand
Joined: Sep 20, 2001
Posts: 666
|
|
Thanks a lot! This means that I can not connect to Access DB on another PC directly using that PC�s IP like below: connection = driverManager.getConnection(jdbc:jdbc://111.222.333.444/databasename); I will have to set up my DSN file so that it uses the mapped drive to get to the DB.
|
 |
 |
|
|
subject: Can I use jdbc:odbc to access MS Access database remotely?
|
|
|