在python中打开Access数据库时出错

我是一个新的python编程,我想写一个python程序读取和写入数据到数据库

连接代码如下:

DNS='catalog' DRV = '{Microsoft Access Driver (*.mdb)}' conn = pyodbc.connect('DRIVER=%s;DSN=%s;' % (DRV,DNS)) 

目录是DSN名称。

我收到以下错误:

 Traceback (most recent call last): File "C:\Python27\exampes\xxx.py", line 8, in <module> conn = pyodbc.connect('DRIVER=%s;DSN=%s;' % (DRV,DNS)) Error: ('01000', "[01000] [Microsoft][ODBC Microsoft Access Driver]General Warning Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x12b4 Thread 0x1544 DBC 0x567ea4 Jet'. (1) (SQLDriverConnect); [01000] [Microsoft][ODBC Microsoft Access Driver]General Warning Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x12b4 Thread 0x1544 DBC 0x567ea4 Jet'. (1)" 

谁能帮帮我吗..?

Solutions Collecting From Web of "在python中打开Access数据库时出错"