Question posted 2009 · +24 upvotes
How can I access Microsoft Access databases in Python? With SQL?
I’d prefere a solution that works with Linux, but I could also settle for Windows.
I only require read access.
Accepted answer +25 upvotes
On Linux, MDBTools is your only chance as of now. [disputed]
On Windows, you can deal with mdb files with pypyodbc.
To create an Access mdb file:
import pypyodbc
pypyodbc.win_create_mdb( "D:\Your_MDB_file_path.mdb" )
Here is an Hello World script that fully demostate pypyodbc’s Access support functions.
Disclaimer: I’m the developer of pypyodbc.
External references cited (2)
- stackoverflow.com — [disputed]
- code.google.com — Here is an Hello World script
Top ms-access Q&A (6)
- How can I modify a saved Microsoft Access 2007 or 2010 Import Specification? +31 (2008)
- OleDbCommand parameters order and priority +28 (2009)
- Is there an equivalent to the SUBSTRING function in MS Access SQL? +26 (2009)
- MS Access library for python +24 (2009)
- is there any replacement of Access? +21 (2009)
- MS-Access – you tried to execute a query that does not include the specified aggregate function +17 (2013)
ms-access solutions on this site
— top 7%.