Type 4 JDBC driver for MS ACCESS(.mdb) database

Type 4 JDBC driver for MS ACCESS(.mdb) database?

Ask Question

up vote4down votefavorite

2

My Java application uses a .mdb database and i want to run this application on MAC OS for that am definitely gonna nead a TYPE 4 JDBC driver i have google and came across two - HXTT & StelsMDB but both are out of my reach

So if any body has some alternative or suggestions please reply.

Thanks in advance

java ms-access jdbc

shareimprove this question

edited Nov 26 '10 at 11:05

skaffman

330k81715714

asked Nov 26 '10 at 10:57

Jinith

52731025

  • May be of interest: sourceforge.net/projects/jackcess/files – Fionnuala Nov 26 '10 at 11:28

  • Jackcess is not a JDBC driver but a special purpose library. You cannot use it as a drop-in replacement and would have to re-factor all of your database code if you did. Rather than support SQL statements, you have to create database objects and invoke methods on those objects to interact with the database. – PeterToTheThird Nov 12 '12 at 15:23

add a comment

5 Answers

activeoldestvotes

up vote4down voteaccepted

MS Access databases on MS Windows are driven by the Microsoft Jet Engine. Different from client server database management systems like MS SQL Server or MySQL the connection to a MS Access database runs in embedded mode via OLE and some DLLs.

As far as I know there is no Jet Engine implementation for operating systems other than MS Windows. So if you want to connect to a MDB file on Mac OS a simple JDBC driver is not enough. There has to be some kind of emulation layer to emulate the Jet Engine DLLs. According to the HXTT website this is exactly the way the HXTT JDBC driver works.

From the HXTT website:

It contains a fast database engine written in Java, which supports embedded and server modes.

If the usage of the MS Access database format is an absolute requirement, then these kind of emulation might be the best way for you. But you have to testify if the compatibility level is high enough. (Maybe there is no way to access VBA macros contained in the MDB file.)

It seems there is no open source project doing the same kind of emulation like HXTT.

There are several alternatives. If you want an embedded database system then you can use for example

  • SQLite (this JDBC driver supports Mac Os) (one database file, requires some native libraries),
  • H2 (only a few database files, pure Java) or
  • Apache Derby (many database files, pure Java).

Or you can use a client server database management system, install the server on a host and connect to that host from your Mac OS machine. For that you can use for example

Even the pure Java databases H2 and Derby have client server modes.

shareimprove this answer

answered Nov 28 '10 at 8:19

vanje

8,14022336

  • 1

    Jet has been superseded by its successor, ACE, which is really just an upgrade to Jet. All of what you say still applies, but your answer would be more complete if you incorporated the ACE reference. – David-W-Fenton Nov 30 '10 at 1:04

  • This answer is outdated. See this answer for a free open-source JDBC driver for Access databases (UCanAccess). More information available from this question. – Gord Thompson May 7 '15 at 14:59

add a comment

up vote6down vote

I've used jackcess to read the tables from an MDB and convert the database to sqlite3. Not ideal if you need to keep the .mdb format, but it allowed me to keep the database in a single file and made the database cross-platform.

shareimprove this answer

edited Jun 29 '12 at 17:26

jtahlborn

46.3k55693

answered Nov 26 '10 at 14:04

Jeff Knecht

2,28911111

add a comment

up vote3down vote

I suppose UCanAccess is what you are looking for.

It is an open source Java JDBC Driver implementation which allows Java developers and jdbc client programs (e.g., DBeaver, NetBeans, SQLeo, Open Office Base, Libre Office Base, Squirrell) to read/write Microsoft Access database. Because it is a pure java implementation it run in both Windows and non-Windows Operative Systems (e.g., linux/unix). No ODBC needed.

shareimprove this answer

answered May 7 '15 at 14:29

lu_ko

2,19911624

add a comment

up vote2down vote

StelsMDB is not as expensive as HXTT, still not open source...

http://www.csv-jdbc.com/stels_mdb_jdbc.htm

Have'n tried it, but evaluation copy is available.

Anyone else got suggestions? I'm looking for an opensource variant myself. Shouldn't be impossible to build on top of jaccess ...

shareimprove this answer

answered Oct 18 '11 at 4:09

Jon Martin Solaas

6271819

add a comment

up vote0down vote

We use stelsMDB JDBC driver at our server to read/write MDB files. It is platform-independent, so you can use it in MacOS as well.

shareimprove this answer

answered Mar 28 '13 at 7:20

serg kunz

1066

add a comment

猜你喜欢

转载自blog.csdn.net/evilcry2012/article/details/81700413