jetdb
A Rust library and CLI tool for reading Microsoft Access database files (.mdb / .accdb).
Written in pure Rust with no C/C++ dependencies or FFI, so it works out of the box on macOS, Windows, and Linux. Supports Access 97 (Jet3) through Access 2019 (ACE17).
Installation
CLI Tool
As a Library
[]
= "0.1.1"
CLI Usage
# Show the database engine version
# List tables
# Show table schema (columns, indexes, relationships)
# Generate DDL (SQLite / PostgreSQL / MySQL / Access)
# Export table data as CSV
# List saved queries / show SQL
# List VBA modules / show source code
# Show object properties
See docs/cli.md for detailed options and output examples.
Library Usage
use ;
For detailed API documentation and more examples, run cargo doc --open or see docs.rs/jetdb (available after crates.io publication).
Supported Versions
| Engine | Access Version | File Format |
|---|---|---|
| Jet3 | Access 97 | .mdb |
| Jet4 | Access 2000/2003 | .mdb |
| ACE12 | Access 2007 | .accdb |
| ACE14 | Access 2010 | .accdb |
| ACE15 | Access 2013 | .accdb |
| ACE16 | Access 2016 | .accdb |
| ACE17 | Access 2019 | .accdb |
Features
- Read table metadata (columns, indexes, relationships)
- Read row data with Rust type mapping (Text, Long, Double, Timestamp, Money, Memo, OLE, GUID, etc.)
- Generate DDL for SQLite, PostgreSQL, MySQL, and Access SQL
- Recover SQL from saved queries
- Extract VBA module source code
- Read object properties (LvProp)
- Decrypt RC4-encrypted databases
- Handle Jet3 (Latin-1) and Jet4+ (UTF-16LE, compressed text) encodings
Limitations
- Read-only (no write support)
- No index-based lookups (full table scan only)
- Loads all rows into memory; be mindful of memory usage with very large tables
- Password-protected databases are not supported
- Replication databases (.mda) are untested
- Multi-page overflow rows (LOOKUP_FLAG) are skipped; some large memo/OLE fields may be missing
Acknowledgments
- mdbtools — HACKING.md was an invaluable reference for understanding the MDB/ACCDB file format
- Jackcess (Apache License 2.0) — most test .mdb/.accdb files are sourced from this project (some were created independently)
License
MIT OR Apache-2.0