为什么我无法使用 pyodbc 连接到 Microsoft Access 数据库?

时间:2021-05-16 16:59:18

标签: python ms-access pyodbc

我的代码:

from pyodbc import *

Connection=connect(r'Driver={Microsoft Access Driver(*.mdb,*.accdb)};'
    r'DATABASE=C:\Users\D3\Desktop\Python\Fishking_Project_V1\Fishking_Menu_Database_V1.accdb')
Cursor=Connection.cursor()
Cursor.execute('select * from All Items')

for row in Cursor.fetchall():
    print(row)

错误:

<块引用>

InterfaceError: ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] 未找到数据源名称且未指定默认驱动程序 (0) (SQLDriverConnect)')

0 个答案:

没有答案
相关问题