Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

getting data from a Microsoft Access DB (.mdb file)

by agaffney (Beadle)
on Jan 04, 2005 at 20:28 UTC ( #419398=perlquestion: print w/ replies, xml ) Need Help??
agaffney has asked for the wisdom of the Perl Monks concerning the following question:

I need to write a script that queries a MS Access database (in a .mdb file). The file itself is sitting on the Linux box which this script will be running from. The program that uses the DB runs on a Windows box and accesses the .mdb file via a samba share.

What are my options for accessing this DB from the Linux side? Can I read from the .mdb file directly with some module? Can I use DBD::ODBC to access the DB across the network?

Comment on getting data from a Microsoft Access DB (.mdb file)
Re: getting data from a Microsoft Access DB (.mdb file)
by Grygonos (Chaplain) on Jan 04, 2005 at 20:41 UTC

    DBD::ODBC has worked for me in the past. That's from a windows box, but I don't think the module is platform specific, however you will need a driver. Some links to potential drivers for linux are provided in the documentation in the link above.

      The ODBC driver, in this case, needs only to work on the machine where the script will run. DBD::ODBC will work perfectly for this.

      I somehow missed "From the Linux side" in the root node, making the redacted text entirely redundant. My bad.

      Anima Legato
      .oO all things connect through the motion of the mind

Re: getting data from a Microsoft Access DB (.mdb file)
by dragonchild (Archbishop) on Jan 04, 2005 at 20:43 UTC
    The first place to start is http://mdbtools.sourceforge.net/. That has the tools needed to access the Jet database engine, which is the underpinning of MS Access, MS Money, and a few others.

    The next step is to use DBD::ODBC and the ODBC driver that comes with MDBTools to access it. At this point, you're beyond my knowledge.

    Being right, does not endow the right to be rude; politeness costs nothing.
    Being unknowing, is not the same as being stupid.
    Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
    Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

      You've been extremely helpful. I'm compiling mdbtools now and then I'll read through the docs. Thanks.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://419398]
Approved by Grygonos
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2014-08-30 01:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (291 votes), past polls