[Zope3-Users] CoInitialize and Zope3
Luke Benstead
luke at riverhall.co.uk
Fri Jul 21 12:36:08 EDT 2006
Hi,
First a bit of background of what I'm doing:
I have being attempting to write a Zope3 Database Adapter using adodbapi
to connect to SQL Server on Windows. When the time came to test the code
I could not use the connect() method as it required I used
pythoncom.Coinitialize() . Once I added this it was possible to connect
to the database. However, when I try to query the database I get one of
two errors either:
pywintypes.com_error: (-2147352567, 'Exception occurred.', (0,
'Microsoft OLE DB Provider for ODBC Drivers', 'No transaction is
active.', None, 0, -2147168242), None)
or
pywintypes.com_error: (-2147352567, 'Exception occurred.', (0,
'Microsoft OLE DB Provider for ODBC Drivers', 'Transaction cannot start
while in firehose mode.', None, 0, -2147467259), None)
These exceptions seem to occur in the rollback transaction code in
adodbapi. After a bit more investigation I noticed that rollbackTrans
was being called because of an exception stemming from
C:\Python24\Lib\site-packages\twisted\python\threadpool.py
Now my questions are... are these errors occurring because of the use of
Coinitialize()? and if so how can I use CoInitialize with Zope3 so that
I can use adodbapi?
Many thanks,
Luke Benstead.
More information about the Zope3-users
mailing list