Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

parse MS Access DB (.MDB)

by bangers (Pilgrim)
on Oct 13, 2014 at 15:50 UTC ( #1103636=perlquestion: print w/replies, xml ) Need Help??

bangers has asked for the wisdom of the Perl Monks concerning the following question:

One of our customers wants to send us data in a Microsoft Access database (.MDB). I need to parse the data, slice it, dice it, reformat it and upload it into our MySQL database for analysis. We don't need to write to the Access database, just read it. After which the Access DB is archived. I am trying to find a Perl library which can parse an Access file in the same way the excellent Spreadsheet::ParseExcel parses an Excel file. I'd rather not install drivers to allow a DB connection, even if they exist in Linux. Use of Windows is not an option and I'll probably be burned at the stake if I even suggest trying to use it.

Replies are listed 'Best First'.
Re: parse MS Acess DB (.MDB)
by Tux (Canon) on Oct 13, 2014 at 16:09 UTC

    mdbtools is a suite of libraries and programs to access Microsoft Access Databases. Most Linux distributions have it readily available in their repositories.

    Enjoy, Have FUN! H.Merijn
      We don't appear to have mdbtools, but my research seems to indicate this is the best option. I'll speak to TPTB. Thanks for your help.
Re: parse MS Access DB (.MDB)
by mje (Curate) on Oct 14, 2014 at 12:02 UTC

    As already mentioned mdbtools is pretty much your only option if you won't/can't install an ODBC driver or if you need to do this for free. However, having attempted to use mdbtools I gave up and use an ODBC driver under DBI and DBD::ODBC now as there was too much broken or not implemented in mdbtools - YMMV. If you are using the new MS Access files (.accdb) it is even worse (see mdbtools bugs and files last changed 8 years ago). MS Access ODBC drivers for Linux are available but they tend to be commercial.

      Having reviewed mdbtools and looked at ODBC drivers we have decided to go back to the client and insist they provide the data in a more sensible format. Thank you to everyone who helped.

        Hello bangers,

        If, for whatever reason, you find yourself needing to fall back to a Plan B, it occurs to me that you could read Access files on Linux by installing either Apache OpenOffice or LibreOffice. Both are free and open source, and should be able to read .mdb files. Just a thought, in case you need another option.

        Hope that helps,

        Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,

A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1103636]
Approved by hominid
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2022-11-30 17:19 GMT
Find Nodes?
    Voting Booth?