I want to connect Python to MS-Access but can't install new software (programs/drivers) and don't have admin rights as I'm working on a company PC. Are there any workarounds?
I could get the pyodbc package but since my Python is 64-bit and MS-Access is 32-bit, I'm expecting that this is the source for errors. Indeed, there are no 64-bit MS-Access Drivers and just an SQL server:
import pyodbc
print(pyodbc.drivers.())
>>> ['SQL Server']
The resulting error is the following:
import pyodbc
conn = pyodbc.connect(r'DRIVER={Microsoft Access Driver (*.mdb, *.accdb)};'
r'DBQ=path\file.accdb;')
>>> InterfaceError: ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data source
name not found and no default driver specified (0) (SQLDriverConnect)')
As mentioned before, I can neither install 32-bit Python nor the 64-bit drivers (at least it seems that I can't). I tried setting up a new environment in order to install 32-bit Python according to this answer by Mike Müller but it resulted in a "CondaHTTPError", which I wasn't able to fix - the answers here didn't work for me.
Is connecting pyodbc to the 32-bit drivers an option? From swashek's answer, this might work
%windir%\SysWOW64\odbcad32.exe
but I'm not sure where or how to apply it in Python.
After connecting Python to MS-Access, my ultimate goal is to extract Access Queries in order to duplicate tables in Python, which were created in Access based on Access data. Is there any completely different way or approach?
Further info: I'm working with Spyder and Anaconda 64-bit.