14 Jun
2004
14 Jun
'04
11:47 p.m.
I would like to use adbapi with the com based adodbapi. I found that the connect call hangs unless I add a call to pythoncom.CoInitialize(). I guess I'm now the tester for using adbapi and adodbapi on windows. I found a reference to the problem at: http://devnulled.com/archives/python.php For a crude test I added pythoncom.CoInitialize() when a new connection is made in twisted.enterprise.adbapi.ConnectionPool.connect() The connection and sql query then run successfully. # import pythoncom import sys sys.coinit_flags = 0 pythoncom.CoInitialize() [ COM code here... ] pythoncom.CoUninitialize()