f



Accessing Access

Hello, what would be a good module for accessing data contained in
a MS Access database file?  Are there any examples of doing this
that you know of?


1
QoS
2/12/2007 5:22:27 PM
comp.lang.perl.misc 33233 articles. 2 followers. brian (1246) is leader. Post Follow

3 Replies
2272 Views

Similar Articles

[PageSpeed] 55

In article <nn1Ah.2617$2%1.2205@trndny02>,  <QoS@domain.invalid.com> wrote:
>
>Hello, what would be a good module for accessing data contained in
>a MS Access database file?  Are there any examples of doing this
>that you know of?

Depends what kind of platform you can use.

If you are under Windows, DBD::ODBC will work wonders.

If you `bridge' Windows <-> Unix, you can set up a DBI::ProxyServer on
a windows box using DBD::ODBC, and talk to it from a DBD::Proxy on the Unix
machine (works wonders, allows you to read and write stuff, the only problem
I've had so far with it is that it cannot be used to dump schema via
DBIx::Class::Schema::Loader).

If you just have the Access file on a new windows machine, as far as I can
tell, you can use commercial tools that I don't know quite well, or you can
use a sourceforge project called mdbtools. The main catch with it is that
they don't release very often, the official release does not read a lot
of Access files correctly, and you will have to compile it from CVS.
The end result is not a DBD driver, it's a bit more akward to use. And I
wouldn't use it to write to the database...

KDE also includes keximdb along its koffice suite. I have little experience
with it, but it should be usable to convert access files.
1
espie
2/12/2007 8:08:50 PM
espie@lain.home (Marc Espie) wrote in message-id:
<eqqhgi$2fja$1@biggoron.nerim.net>
>
>In article <nn1Ah.2617$2%1.2205@trndny02>,  <QoS@domain.invalid.com> wrote:
>>
>>Hello, what would be a good module for accessing data contained in
>>a MS Access database file?  Are there any examples of doing this
>>that you know of?
>
>Depends what kind of platform you can use.
>
>If you are under Windows, DBD::ODBC will work wonders.
>
>If you `bridge' Windows <-> Unix, you can set up a DBI::ProxyServer on
>a windows box using DBD::ODBC, and talk to it from a DBD::Proxy on the Unix
>machine (works wonders, allows you to read and write stuff, the only problem
>I've had so far with it is that it cannot be used to dump schema via
>DBIx::Class::Schema::Loader).
>
>If you just have the Access file on a new windows machine, as far as I can
>tell, you can use commercial tools that I don't know quite well, or you can
>use a sourceforge project called mdbtools. The main catch with it is that
>they don't release very often, the official release does not read a lot
>of Access files correctly, and you will have to compile it from CVS.
>The end result is not a DBD driver, it's a bit more akward to use. And I
>wouldn't use it to write to the database...
>
>KDE also includes keximdb along its koffice suite. I have little experience
>with it, but it should be usable to convert access files.

Thank you very much for your enlightening reply.

The data system will be entirely stand-alone, the access database and the
perl script will run on the same system.

I've downloaded DBD::ODBC and it appears to be a solid solution for opening
these types of files, I'm just hoping that in the end this will be a cross-
platform solution.


Here is an example from the DBD::ODBC POD

    Connect without DSN The ability to connect without a full DSN is
    introduced in version 0.21.
        Example (using MS Access): my $DSN = 'driver=Microsoft Access Driver
        (*.mdb);dbq=\\\\cheese\\g$\\perltest.mdb'; my $dbh =
        DBI->connect("dbi:ODBC:$DSN", '','') or die "$DBI::errstr\n";

I would like to know if this or something similar to this will work on
both the linux, and windows platforms?


1
QoS
2/12/2007 9:47:51 PM
In article <bg5Ah.2444$g82.1459@trndny09>,  <QoS@domain.invalid.com> wrote:
>I would like to know if this or something similar to this will work on
>both the linux, and windows platforms?

Unfortunately, no.  At least not for free.

Been there, done that. 

On a Unix platform, if you really want to connect
to an Access database, you either have to go DBD::Proxy, or to buy some
commercial components for ODBC support.   To the best of my knowledge
there is no free linux ODBC connector that can be used with database
products such as Access.
0
espie
2/13/2007 11:47:24 AM
Reply: