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(jdbcdbc://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
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!
I believe you can also accomplish this by setting up a System DSN instead of a User DSN in your ODBC datasources.
Joined: Sep 28, 2002
Yes, you can set this up in either User or System DSN. System would probably be a better choice.
Joined: Sep 20, 2001
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.