• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Can I use jdbc:odbc to access MS Access database remotely?

 
Ranch Hand
Posts: 672
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, you can set this up in either User or System DSN. System would probably be a better choice.
 
Bruce Jin
Ranch Hand
Posts: 672
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic