• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ODBC and Microsoft access

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I need to work with a MSACCESS database and i need to connect to this database. Can i connect with JDBC using microsoft access?
I also searched and i often heard about creating a dsn before using odbc driver??? What is dsn?
Is it better to use jdbc or odbc (I am working with windows 2000)?
Thanks
Jeff
 
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes you can use MS ACCESS but you will need a driver for it.
Using ODBC is an interum solution. You can use the JDBC-ODBC bridge. Obviously you need to setup the data source(dsn) in ODBC before trying to connect to it. Basically you are giving it a name and what driver to use. In my case I just called it...MyDatabase and it uses a SQL Server driver. Then the connect uses the name MyDatabase to get to ODBC, and ODBC takes it from there.
Eventually you need to get a driver that supports your database because the JDBC-ODBC is not meant to be a production driver (just for development).
Dan
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jeff,
To add to what Daniel said, in Win98 setting up your DSN (which is like a pointer to a DB file on your system) is relatively straightforward - you need to go to the Control Panel and then open up the ODBC Data Sources icon, and then follow the instructions (fairly simple for Access - perhaps not so simple for say SQLServer). I don't imagine setting up a DSN in Windows 2000 is terribly different.
As Daniel said, using the Sun JDBC:ODBC bridge is a fairly temporary measure - it is a type I JDBC driver, and as I understand it will not work over the internet. So, if you are publishing your Access DB on the web, you will need a commercial driver. I have tried Type III drivers from the following sources (type III drivers are also like the Sun JDBC:ODBC bridge but more sophisticated):
http://www.easysoft.com/ http://www.j-netdirect.com
Both of these work nicely with MS Access in my hands, but you can also view a more complete selection of drivers from the Sun site.
Cheers
Alan Watts
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic