Closed GoogleCodeExporter closed 8 years ago
You need to use autocommit=True, actually.
ODBC drivers default to autocommit, but the Python DB API specification
requires it
to be turned off. So the first thing pyodbc does is turn *off* autocommit --
and
this is what the Excel driver does not support. If you set the flag to True,
pyodbc
sees there is nothing to do (the driver is already in autocommit mode).
I'll write something about this in a couple of the Wiki pages.
Original comment by mkleehammer
on 12 Feb 2009 at 5:16
Thanks for the quick response. When I use pyodbc.connect
('DSN=<source>;autocommit=True') I get exactly the same error. Am I missing
something?
Original comment by chris.le...@googlemail.com
on 12 Feb 2009 at 5:24
The autocommit is not part of the connection string, but is a separate keyword:
cnxn = pyodbc.connect('DSN=<source>', autocommit=True)
Original comment by mkleehammer
on 12 Feb 2009 at 5:36
Original comment by mkleehammer
on 9 Mar 2009 at 10:19
Original comment by mkleehammer
on 21 Nov 2010 at 4:43
Original issue reported on code.google.com by
chris.le...@googlemail.com
on 12 Feb 2009 at 5:01