py2exe + win32com + DAO

Trevor trevor.lango at gmail.com
Tue May 12 20:20:15 EDT 2009


I have a Python code module that adds records to a MS Access
database.  The following line of code executes successfully when the
code module is run as a Python script:

daoEngine = win32com.client.Dispatch(r'DAO.DBEngine.36')

It also runs successfully when the Python script is compiled and run
as an executable using the Py2exe utility.  However, when the compiled
executable is called from VBA using the win32 CreateProcess function,
the preceding code produces this output:

!!python/name:pywintypes.com_error ''

What is causing this error?



More information about the Python-list mailing list