Craig H. Anderson
2004-06-14 23:47:45 UTC
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()
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()