[egenix-users] mx.ODBC.windows Transaction Problem

Joe jds at kc.rr.com
Fri Sep 20 22:34:02 CEST 2002


Hello everyone,

I am using the ODBC windows module to connect to a MSSQL 2000 server, everything works except manual-transaction mode. I set it to clear_auto_commit (default), so I can use .commit() and .rollback(), and I get the Error: Attribute Error: commit. The docs say this means the database doesn't support transactions but I know this isn't the case. I have a perl script using DBI::ODBC that is able to use transactions. Do I need to recompile the module with certain flags to allow the module to recognize that the DB supports transactions? Any light that could be shed on this problem would be appreciated! Here's a code snippet that throws the AttributeError:

import mx.ODBC.Windows

db = mx.ODBC.Windows.DriverConnect('DSN=test;uid=xxx;pwd=xxx')
cursor = db.cursor()
cursor.execute("update users set name='bob' where users_pk = 15")
cursor.commit()
cursor.close
db.close

-------------- next part --------------
An HTML attachment was scrubbed...
URL: /mailman-archives/egenix-users/attachments/20020920/050e6d4f/attachment-0139.htm


More information about the egenix-users mailing list