We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, I am not able to open an .mdb file on Ubuntu. I am attempting to do that with pyodbc and mdbtools. This is how I installed it:
pyodbc
mdbtools
sudo apt install python3-dev unixodbc-dev sudo apt install mdbtools pip install --user pyodbc
and this is the error I get when running the py script:
py
(pyodbc.Error) ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'Microsoft Access Driver (*.mdb, *.accdb)' : file not found (0) (SQLDriverConnect)")
So pyodbc cannot find the proper driver I guess. this:
import pyodbc pyodbc.drivers()
returns an empty list.
I assumed the required driver is installed when mdbtools is installed - or am I wrong? How to make it work?
Thank you for your answers.
The text was updated successfully, but these errors were encountered:
You have to install the odbc-mdbtools package which contains the actual ODBC driver shared object file (libmdbodbc.so).
libmdbodbc.so
apt install odbc-mdbtools
This should add a driver stanza to /etc/odbcinst.ini:
/etc/odbcinst.ini
[MDBTools] Description=MDBTools Driver Driver=libmdbodbc.so Setup=libmdbodbc.so FileUsage=1 UsageCount=1
Now you can use pyodbc to load the MDB file:
import pyodbc db = pyodbc.connect("Driver=MDBTools;DBQ=path/to/file.mdb") print(db.cursor().tables())
Sorry, something went wrong.
[IM001] [unixODBC][Driver Manager]Driver does not support this function (0) (SQLPrimaryKeys)
No branches or pull requests
Hello,
I am not able to open an .mdb file on Ubuntu. I am attempting to do that with
pyodbc
andmdbtools
. This is how I installed it:and this is the error I get when running the
py
script:So pyodbc cannot find the proper driver I guess.
this:
returns an empty list.
I assumed the required driver is installed when
mdbtools
is installed - or am I wrong?How to make it work?
Thank you for your answers.
The text was updated successfully, but these errors were encountered: