[nbusers] Re: Automatic database connectivity with MS Access

  • From: Edson Richter < >
  • To:
  • Subject: [nbusers] Re: Automatic database connectivity with MS Access
  • Date: Wed, 21 Nov 2012 10:07:57 -0200
  • Organization: Simkorp Inform├ítica Ltda

Em 21/11/2012 08:37, waghmalemahesh escreveu:
Hi friends....
i have developed one java application in netbeans in which i used Ms Access 
And when i want to connect with ms access database i need to make connection 
with ms access file through several steps like first go int control panel 
after choose administrative tools then jdbc odbc and choosing access file and 
give DSN names and so on.
So my question is that -> Is there any method to connect with database 
automatically when we create jar file or set file of application.

The problem here is that Microsoft does not provide a JDBC drivers for Access.

So the answer to your questions is: Yes and No.

Yes, you can develop a JNI bridge that allows you to manipulate registry and other stuff. This is inelegant and will give you more headaches than a real solution, worse will make your application not portable and hard to maintain.

With Access, you are stuck with ODBC (and the several steps).

Perhaps, if you change the database (lets say, from Access to SQL Express - to stay with the supplier), then you can use the Microsoft JDBC Driver for SQL Server, or the free jTDS, and these are pure JDBC 4 drivers and do not depend on ODBC neither of DLLs, and will keep your application platform agnostic.


Edson Richter

[nbusers] Automatic database connectivity with MS Access

waghmalemahesh 11/21/2012

[nbusers] Re: Automatic database connectivity with MS Access

Edson Richter 11/21/2012

Project Features

About this Project

www was started in November 2009, is owned by jpirek, and has 25 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20150226.965aeb8). © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
Please Confirm