Problems and workarounds for using 32-bit access data sources in 64-bit systems
Win32com.client using a non-corresponding access data source may have the following error
"C:\Program Files\python34\python.exe" c:/users/xupeng02/pycharmprojects/awvsy/awvsy_test.py
Traceback (most recent):
File "c:/users/xupeng02/pycharmprojects/awvsy/awvsy_test.py", line A, in <module>
Conn. Open (' Access ')
File "<comobject ADODB. Connection> ", line 3, in Open
File "C:\Program files\python34\lib\site-packages\win32com\client\dynamic.py", line 287, in _applytypes_
result = Self._oleobj_. Invoketypes (* (DispID, LCID, wflags, RetType, argtypes) + args)
Pywintypes.com_error: (-2147352567, ' accident occurred. ', (0, ' Microsoft OLE DB Provider for ODBC Drivers ', ' [MICROSOFT][ODBC Driver Manager] in the specified DSN, the architecture does not match between the driver and the application ', None, 0, -2147467259), none)
Pyodbc using a non-corresponding access data source may have the following error
"C:\Program Files\python34\python.exe" c:/users/xupeng02/pycharmprojects/awvsy/awvsy_test.py
Traceback (most recent):
File "c:/users/xupeng02/pycharmprojects/awvsy/awvsy_test.py", line <module>
conn = Pyodbc.connect (' dsn=access ')
Pyodbc. Error: (' IM014 ', ' [IM014] [Microsoft][odbc]ָdsnуӧó֮ϵṹƥ (0) ( SQLDriverConnect) ')
Workaround :
Install the 64-bit aceess engine and add 64-bit Access data sources
64-bit Add data source location: C:\Windows\System32\odbcad32.exe
32-bit Add data source location: C:\Windows\SysWOW64\odbcad32.exe
Http://download.microsoft.com/download/2/4/3/24375141-E08D-4803-AB0E-10F2E3A07AAA/AccessDatabaseEngine_x64.exe