Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Accessing a JET (.mdb) database in Python

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

like image 631
Honza Pokorny Avatar asked Apr 01 '10 10:04

Honza Pokorny


People also ask

How do you Access a database in Python?

To access databases in Python, you'll need to use a database adapter. Python offers database adapters through its modules that allow access to major databases such as MySQL, PostgreSQL, SQL Server, and SQLite. Furthermore, all of these modules rely on Python's database API (DB-API) for managing databases.

How do I Access MDB database?

MDB files can be opened with applications like Microsoft Access, MDB Viewer, MDBOpener, and can be converted to ACCDB, CSV, Excel formats, etc.

How do I extract files from an MDB file?

Way 2: MICROSOFT EXCEL On the main ribbon, switch to the “Data” tab. In the “Get External Data“ section, select the “Access Data” icon. On the hard drive, you have to locate the . mdb file and then click on “Open“ button.

How do I Access an open database?

In Windows Explorer, navigate to the drive or folder containing the Access database file you want to open and double-click the database. Access starts and the database is opened.


2 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.

ACCESSdb is a JavaScript library used to dynamically connect to and query locally available Microsoft Access database files within Internet Explorer.

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

like image 133
Tony Toews Avatar answered Oct 06 '22 07:10

Tony Toews


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.

like image 37
tzot Avatar answered Oct 06 '22 07:10

tzot