在Mac上并行的Windows上查找ms访问驱动程序时出错

时间:2014-11-03 09:28:20

标签: python ms-access pyodbc parallels

我正在使用pyodbc使用python 2.7访问MSaccess数据库。我在osx10.9上的parallels v10上运行Windows 7。我正在使用以下代码来测试它:

DBfile = 'c:\\dir\\testdb.db' 
conn = pyodbc.connect('DRIVER={Microsoft Access Driver (*.mdb)};DBQ='+DBfile)

并且似乎找不到MSAccess驱动程序,导致以下错误:

> Traceback (most recent call last):   File "C:/Projects/DBtest.py",
> line 6, in <module>
>     conn = pyodbc.connect('DRIVER={Microsoft Access Driver (*.mdb)};DBQ='+DBfile) Error: ('HY024', "[HY024] [Microsoft][ODBC
> Microsoft Access Driver] '(unknown)' is not a valid path.  Make sure
> that the path name is spelled correctly and that you are connected to
> the server on which the file resides. (-1023) (SQLDriverConnect);
> [01000] [Microsoft][ODBC Microsoft Access Driver]General Warning
> Unable to open registry key 'Temporary (volatile) Jet DSN for process
>  0x590 Thread 0xa50 DBC 0x2c9389c Jet'. (1); [01000] [Microsoft][ODBC
> Microsoft Access Driver]General Warning Unable to open registry key
> 'Temporary (volatile) Jet DSN for process 0x590 Thread 0xa50 DBC
> 0x2c9389c Jet'. (1); [HY024] [Microsoft][ODBC Microsoft Access Driver]
> '(unknown)' is not a valid path.  Make sure that the path name is
> spelled correctly and that you are connected to the server on which
> the file resides. (-1023)")

我在SO上看不到任何涉及此问题的内容,但我是ODBC的新手,对SO来说还是新手,如果我忽略了任何东西,那么道歉。有没有人有任何想法?

干杯

0 个答案:

没有答案