Take the 2-minute tour ×

Is there a way to access a JET database from Python? I'm on Linux. All I found was a .mdb viewer in the repositories, but it's very faulty. Thanks

share|improve this question
possible duplicate of stackoverflow.com/questions/256459/… –  Roberto Liffredo Apr 1 '10 at 10:31
Or stackoverflow.com/questions/853370/… –  Remou Apr 2 '10 at 18:39
add comment

4 Answers

MDB Tools is a set of open source libraries and utilities to facilitate exporting data from MS Access databases (mdb files) without using the Microsoft DLLs. Thus non Windows OSs can read the data. Or, to put it another way, they are reverse engineering the layout of the MDB file.

Jackcess is a pure Java library for reading from and writing to MS Access databases. It is part of the OpenHMS project from Health Market Science, Inc. . It is not an application. There is no GUI. It's a library, intended for other developers to use to build Java applications.


Both Jackcess and ACCESSdb are much newer than MDB tools, are more active and have write support.

share|improve this answer
add comment

Install your distribution's packaged version of mdbtools, use mdb-export to export the Jet data to text files, import the data into a SQLite database, and have a combination of code and data that works in almost any computing environment you might get your hands on.

share|improve this answer
add comment

Probably the most simple solution:

  1. Download VirtualBox and install Windows and MS access in it.

  2. Write a small Python server which use ODBC to access the database and which receives commands from a network socket.

  3. On Linux, connect to the server in the virtual machine and access the database this way.

This gives you full access to all features. Every other solution will either limit the features you can use (for example, you won't be able to modify the data) or be pretty unsafe.

share|improve this answer
Why the downvote? –  Oddthinking Oct 18 '10 at 5:16
I didn't downvote it, but step 2 sounds substantially more complicated than any of the other options. –  David-W-Fenton Oct 23 '10 at 0:54
I've had to do something similar to this, horrible experience, but it did work. –  David May 25 '11 at 0:20
add comment

If you build the CVS version of mdb-tools, it works rather well. It fixed a lot of issues I had trying to use the one in the repositories related to memo field size. mdb-tools is basically a dead project, but people have still been occasionally contributing code to the CVS. The build in Ubuntu is from 2004 I think.

CVS instructions here:


If using Ubuntu, before downloading the sources you'll want to enable source repositories and do:

apt-get build-dep mdbtools

That will get the required packages you'll need to manually build the sources from CVS.

share|improve this answer
add comment

Your Answer


