1

I've been searching for the solution to open a .accdb database and read/write date from and into this file. The file is saved locally and not on a server and the solution should work without additional libraries.

Can someone help me?

Thank you for your advice

TableCreek
  • 799
  • 8
  • 18

2 Answers2

3

My recommendation would be to use UCanAccess.

The other common approach on Windows is was to use the JDBC-ODBC Bridge in conjunction with the Microsoft Access ODBC driver, but

  1. that method has some limitations, particularly with respect to full Unicode support, and

  2. the JDBC-ODBC Bridge has been removed from Java SE 8 and is not supported (ref: here).

For more information on UCanAccess see

Manipulating an Access database from Java without ODBC

Gord Thompson
  • 116,920
  • 32
  • 215
  • 418
  • Sorry, i forgot to say, that i am searching a solution without additional libraries. – TableCreek Jan 14 '14 at 19:22
  • 1
    @user3181265 Then you should edit your question to add that requirement. – Gord Thompson Jan 14 '14 at 19:40
  • 1
    @user3181265: there is no solution built into Java for this, so the only solution "without additional libraries" is to write your own. Otherwise you will need to bite the bullet and use an external library. As a replacement for the JDBC/ODBC you could use [UCanAccess](http://sourceforge.net/projects/ucanaccess/) –  Jan 15 '14 at 07:45
  • To open and read say some dBase files, you need some code library that can read that data. To open a Advanced Revelation file, you need some library. To open and read a power-point file, you need power-point. To open and read a PDF file, well once again you need a PDF library. To open and display a jpeg file, well, guess what, you need a library. How the computer industry has worked to read such binary file formats is really kind of a Homer Simpson moment of truth (Duh!!!!). What other binary format file have you EVER been able to read in the past without some supporting code library? – Albert D. Kallal Sep 15 '18 at 18:49
  • Windows since win 98 has shipped with a copy of the JET data engine that will read mdb format without having to install additional code, but for accDB formats, you have to install the ACE database engine (which can be installed without having to install Access the application. So how you going to read ANY binary file should not be a surprise to you - you need to install some software, or (gasp) write your own code which in effect would require you to reverse engineer the JET/ACE database file format Same goes to read MySQL files, or just about any database file format on planet earth. – Albert D. Kallal Sep 15 '18 at 18:52
1

There is an Apache Licensed Java library called Jackcess that allows reading/writing MS Access files.

Thad Guidry
  • 579
  • 4
  • 8