[Chicago] pyodbc to ms access

Jeremy McMillan jeremy.mcmillan at gmail.com
Mon May 9 08:03:55 EDT 2016


You probably need to exhume a "Jet" db file format parser. Take a deep
breath. Maybe there's ODBC, but probably not.

On Mon, May 9, 2016, 06:29 Aaron Elmquist <elmq0022 at umn.edu> wrote:

> Does anyone have some advice or insight on connecting to an MS Access
> Database using python?
>
> Here's my info:
>
> Connection String:
>
>     r'DRIVER={Microsoft Access Driver (*.mdb,
> *.accdb)};DBQ=C:\Path\to\DB\db.mdb;'
>
> Python Version:
>
>     Python 3.5.1 :: Continuum Analytics, Inc. - 64 bit
>
> OS
>
>     Windows 7
>
> Office
>
>     32 Bit
> Here's my error:
>     Error: ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data source
> name not found and no default driver specified (0) (SQLDriverConnect)')
>
> but...
>
> pyodbc.dataSources() returns:
>     {'Excel Files': 'Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm,
> *.xlsb)',
>      'MS Access Database': 'Microsoft Access Driver (*.mdb, *.accdb)',
>      'dBASE Files': 'Microsoft Access dBASE Driver (*.dbf, *.ndx, *.mdx)'}
>
> Do I need to use a 32 bit python to get this done?
> Can I specify the python bits version to use in a specific conda env?
>
> Thanks,
>
> Aaron
> _______________________________________________
> Chicago mailing list
> Chicago at python.org
> https://mail.python.org/mailman/listinfo/chicago
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20160509/4f113290/attachment.html>


More information about the Chicago mailing list