[egenix-users] help making data source on Unix

M.-A. Lemburg mal at egenix.com
Tue Feb 10 21:47:16 CET 2009

On 2009-02-10 21:28, Tentin Quarantino wrote:
> Hello,
> I thought it best to try the mxODBC driver on Windows because the file
> I wanted to read/query was from Windows environment. It is a Microsoft
> ".mdb" file.
> The data source string (what's the proper name for this?) which I used
> is the following:
> driver = 'DRIVER={Microsoft Access Driver
> (*.mdb)};DBQ=c:/databases/sample/BFDsystem.mdb;PWD=secret'
> I was successful, to query the mdb file: BFDsystem.mdb
> However, I need to run this python program on Unix. Is it possible to
> read this "mdb" file from Unix host and file system? And if so, what
> is the data source config string? I am thinking this will not be
> possible due to special sauce on Windows machine.

If you want to use the MS ODBC driver for this, you will have
to redirect the work to a Windows machine, e.g. run the Python
program on Linux and use mxODBC Connect to connect to the Windows
box and run your queries there.

The Windows box will have to get access to the .mdb file for
this to work.

Another possibility is trying to read the .mdb file directly
on Linux using e.g. MDBTools (http://freshmeat.net/projects/mdbtools/).
They provide a simple ODBC driver which you can hook up to mxODBC
to read the files. However, that project has never reached a stable
release and doesn't look like it's being maintained.

Marc-Andre Lemburg

Professional Python Services directly from the Source  (#1, Feb 10 2009)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/

::: Try our new mxODBC.Connect Python Database Interface for free ! ::::

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611

More information about the egenix-users mailing list