Python 访问Access数据库?
报错:Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\AaronChan\AppData\Local\Programs\Python\Python38\lib\tkinter\__init__.py", line 1883, in __call__
return self.func(*args)
File "C:\Users\AaronChan\Desktop\旅行小助手系统\3-3 旅行小助手系统.py", line 8, in CmdChk
conn.Open(DSN)
File "<COMObject ADODB.Connection>", line 2, in Open
File "C:\Users\AaronChan\AppData\Local\Programs\Python\Python38\lib\site-packages\win32com\client\dynamic.py", line 271, in _ApplyTypes_
result = self._oleobj_.InvokeTypes(*(dispid, LCID, wFlags, retType, argTypes) + args)
pywintypes.com_error: (-2147352567, '发生意外。', (0, 'ADODB.Connection', '未找到提供程序。该程序可能未正确安装。', 'C:\\Windows\\HELP\\ADO270.CHM', 1240655, -2146824582), None)
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\AaronChan\AppData\Local\Programs\Python\Python38\lib\tkinter\__init__.py", line 1883, in __call__
return self.func(*args)
File "C:\Users\AaronChan\Desktop\旅行小助手系统\3-3 旅行小助手系统.py", line 81, in CmdAdd
e1.focus_set()
IndexError: list index out of range
这是啥意思? e1列表为空,所以index超出。核查一下e1列表的生成方式。
页:
[1]