Fetching data from MS Access files into plain text TSV-file and/or to MySQL

Note. The methods described below are cross-platform. But as MicroSoft provide their ODBC driver for MS Access for free, this information is mostly actual for non-Windows users (like Linux, FreeBSD, Mac's, etc), although it can be useful with MS Windows also.
Solution #1. Java (Jackcess):
Access2tsv.java
Source code.
Access to TSV (tab-separeted values, plain text) converter.
Command-line parameters:
  (1) source MS Access database file;
  (2) table name in MS Access database;
Note 1: if only MS Access file name parameter provided you will get the list of the tables in this file.
Note 2: TSV-files can be directly connected to or imported into MySQL database engine, see documentation of MySQL.
Access2mysql.java
Source code
Access to MySQL (SQL, plain text) converter.
Command-line parameters:
  (1) source MS Access database file;
  (2) table name in MS Access database;
  (3) table name in MySQL database;
  (4) [optional] two-columns TSV-file table with mapping column names from MS Access table into MySQL table.
Note 1: if only MS Access file name parameter provided you will get the list of the tables in this file.
Note 2: if only one value in a row of column mapping file provided this field will be ommited.
Note 3: the dot after the first value in a row of column mapping file means values in this field will threated as double-type.
Note 4: Output data puts into standart-output stream. To put data directly into MySQL use pipeline:
Example: java Access2tsv 1_source.mdb 2_source_table 3_target_table 4_subst.tsv | mysql 5_target_database
! Bugfix patch
2 Sep, 2015
Due the Jackaccess currently cannot write to MS Jet 3 files (MS Access 97) my converter was unable to work with them, failing with the error message:
Error: cannot read the input file ...
java.io.IOException: jet format 'VERSION_3' does not support writing

Meanwhile in fact it don't write to MS Access files anything. To fix this change in the sources:
Database db = DatabaseBuilder.open(new File(filename));
to
Database db = new DatabaseBuilder(new File(filename)).setReadOnly(true).open();
New binary file with the changing is here (Access2mysql.class, see below):
Access2mysql.class
Binary (Java executable)
2 Sep, 2015
New version with bugfix (see above). The usage is the same.
Access2tsv.class
Binary (Java executable)
23 Feb, 2014
Usage:
java -cp .:./jackcess-2.0.1.jar:./commons-lang-2.6.jar:./commons-logging-1.1.3.jar Access2tsv working parameters
jackcess-2.0.1.jar
Binary (Java library)
Free Jackaccess library, needed to work.
The project homepage: http://jackcess.sourceforge.net
commons-lang-2.6.jar
Binary (Java library)
Free commons-lang library, needed to work.
http://commons.apache.org/proper/commons-lang
commons-logging-1.1.3.jar
Binary (Java library)
Free commons-logging library, needed to work.
http://commons.apache.org/proper/commons-logging
See also:

Solution #2. C++, Qt, ODBC:
odbc2tsv.cpp
Source code
Here is ODBC to TSV converter. It's written on cross-platform C++ and Qt. It uses plain-text helper file with numerated list of possible ODBC data source types.
With free MS ODBC driver it can fetch data not only from mdb and accdb, but also from any MS Excel files and from other sources.
As I know Linux has no free MS Access ODBC drivers yet but being compiled for MS Windows theoretically this program can be used under Linux then with Wine emulator. With some ado Wine emulator promise let you to use the native Windows ODBC drivers from running MS Windows executables (you are to install ODBC drivers by MS under Wine in advance!), but I was unable to check it. If you succeeded to use it under the Linux and other Unix-like systems with free drivers - please let me know!
Command-line parameters:
  (1) number of ODBC source in drivers.lst plain text file;
  (2) table name in MS Access database, dot or column range for Excel sheets;
  (3) source file name.
Note 1: if the dot (point) symbol provided instead of a table name you will see the list of the tables.
Note 2: while reading Excel files you may specify name column range, cell range or sheet name instead of "source table" in the second parameter.
odbc2tsv-bin.7z
32-bit complied MS Windows executables.
Note 1: this executable requires 32-bit ODBC drivers. It can be a problem under a 64-bit system.
Note 2: Warning! In case of huge date table you need several Gb of RAM aviable. I notice the program stop processing with no warning beacuse lack of resources. In this case sometime you can find no data in some columns of output table, and it is hardly to notice!

Questions, suggestions, comments: shestero@mail.ru © Michael Shestero, 2014, 2015.