I'm a Linux user so an open-source, Linux-friendly solution would be preferable.
The advantage of SQLite is that it is easier to install and use and the resulting database is a single file that can be written to a USB memory stick or emailed to a colleague. Many applications use SQLite as a cache of relevant content from an enterprise RDBMS.
Open your Microsoft Access database. Select the External Data tab in the ribbon. Expand the New Data Source drop-down and select From Other Sources, then select ODBC Dababase. In the Get External Data - ODBC Database dialog box, select Import the source data into a new table in the curent database, and click OK.
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 has write support.
This is probably not the answer you want but the safest way to do this would be to get Visual Studio Express and read in the database using ODBC connector and then writing out the data using the ADO.NET Sqlite connector. I have found generally third party tools to talk to JET databases... JET waas aweful and never easily reverse engineered.
To complement Tony's answer with examples:
This is how I just did a conversion with MDB Tools to sqlite, in Ubuntu 16.04:
sudo apt install mdbtools
# define variables for easier copy/paste of the rest
in="my-jet4-file"
schema="$in-schema.sql"
out="$in.sqlite"
mdb-schema "$in" sqlite > "$schema"
sqlite3 "$out" < "$schema"
mdb-tables -1 "$in" \
| while read table; do \
mdb-export -I sqlite "$in" "$table" | sqlite3 "$out"; \
done
This uses Insert statements and is quite slow.
A faster alternative would be to export/import .csv files. I had used that sucessfully with Postgres:
#...
out="my_pg_db"
createdb "$out"
mdb-schema "$in" postgres > "$schema"
psql -U postgres -d "$out" -f "$schema"
mdb-tables -1 "$in" \
| while read table; do \
mdb-export -d'|' "$in" "$table" > "$table.csv"; \
psql -d "$out" -c "COPY \"$table\" FROM '$table.csv' DELIMITER '|' CSV HEADER"
done
Finally, there is also mdb-sqlite, which uses Jackcess and Java. After installing Java and ant
:
cd mdb-sqlite-1.0.2
ant dist
java -jar dist/mdb-sqlite.jar "$in" "$out"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With