I am attempting to use pyobdc
to read data from a paradox database, and I keep getting the following error when attempting to connect to the database:
This problem can be solved having Office and Python interpreter with same bits configuration. But, it's true, I had 64bit Office and Python and doesn't work ...
Here is the solution.
There are actually two (2) different Access ODBC drivers from Microsoft:
Microsoft Access Driver (*.mdb)
Microsoft Access Driver (*.mdb) - This is the older 32-bit "Jet" ODBC driver. It is included as a standard part of a Windows install. It only works with .mdb (not .accdb) files. It is also officially deprecated.
Microsoft Access Driver (*.mdb, *.accdb)
Microsoft Access Driver (*.mdb, *.accdb) - This is the newer "ACE" ODBC driver. It is not included with Windows, but it is normally included as part of a Microsoft Office install. It is also available as a free stand-alone "redistributable" installer for machines without Microsoft Office. There are separate 64-bit and 32-bit versions of the "ACE" Access Database Engine (and drivers), and normally one has either the 64-bit version or the 32-bit version installed. (It is possible to force both versions to exist on the same machine but it is not recommended as it can "break" Office installations. Therefore, if you already have Microsoft Office it is highly recommended that you use a Python environment that matches the "bitness" of the Office install.)
The easiest way to check if one of the Microsoft Access ODBC drivers is available to your Python environment (on Windows) is to do
import pyodbc
[x for x in pyodbc.drivers() if x.startswith('Microsoft Access Driver')]
If you see an empty list then you are running 64-bit Python and you need to install the 64-bit version of the "ACE" driver. If you only see ['Microsoft Access Driver (*.mdb)'] and you need to work with an .accdb file then you need to install the 32-bit version of the "ACE" driver.
In this link you can download your driver LINK
Info source
Regards!