pyodbc.尝试打开jet数据库时出错
我正在尝试读取由软件 Hy Tek Meet Manager
import pyodbc
filename = 'db.mdb'
connection = pyodbc.connect('DRIVER={Microsoft Access Driver (*.mdb)};DBQ='+filename)
cursor = conn.cursor()
当我运行此代码时,我收到错误:
pyodbc.Error: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found, and no default driver specified (0) (SQLDriverConnectW)')
对此错误的所有其他搜索都导致了死胡同。关于为什么会发生这种情况有什么建议吗?
I'm trying to read data stored in a ms access database that generated by a piece of software Hy Tek Meet Manager
import pyodbc
filename = 'db.mdb'
connection = pyodbc.connect('DRIVER={Microsoft Access Driver (*.mdb)};DBQ='+filename)
cursor = conn.cursor()
When I run this code I get the error:
pyodbc.Error: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found, and no default driver specified (0) (SQLDriverConnectW)')
All other searches for this error have led to dead ends. Any suggestions as to why this is happening?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据您的评论之一,听起来您正在使用 EasySoft MS Access ODBC 驱动程序。参考他们的支持页面,我会猜测以下是您想要用于连接字符串的内容:
Based on one of your comments it sounds like you are using the EasySoft MS Access ODBC drivers. Referencing their support page, I would guess the following is what you want to use for your connection string: