I hope you can help me with this. Is there any way to conncet to MS Access2007 database from a java app without having to do the config for every machine when deploying the app? What is the best way of doing so? I heard about the pure java driver i.e. the type 4 but have no idea how to use it!
I use eclipse by the way.
Please try to help. Any effort will greatly be appreciated.
Thank you, Tsnaq, for your reply. I don't want to use JDBC:ODBC because I have to do give the database file location every time I deploy the app to a different machine! I found the hxtt as a type4 driver but I don't know how to chane the classpath- anyone can help please.
Thank you, Paul, for your reply. I think I found a way to do it through a type4 driver called HXTT Access Pure Java JDBC Driver. It can be downloaded from here
I downloaded version 4.0 which is compatible with 1.6 JDK and this is how it is setup.
1- Download the file, unzip it then go to the lib directory and copy the jar file to your project workspace.
2- In Eclipse open your project, then go to run menu- run configurations then in the classpath tab you can add the jar file using the (add external jars) button.
3- You need to change the url string of your database file. For example if you're using Access2007 then you change it to:
Under other circumstances you might be able to hire me to advise you about what database server you might choose, based on a review of your requirements. But at the present time you can't do that.
Joined: Sep 15, 2012
Paul Clapham wrote:Under other circumstances you might be able to hire me to advise you about what database server you might choose, based on a review of your requirements. But at the present time you can't do that.
The trouble is that I don't have business and not intend to have one. I'm just trying to learn things. I thought this forum was to share knowledge. Hopefully, another gentle code rancher will come along and share their knowledge.
Thank you, Paul. :)
subject: How to conncet to MS Access database2007 from a java app?