Replies: 1 comment
-
|
If an RDBMS driver does not support database transactions, then the autocommit parameter is essentially meaningless because there is nothing to commit. The RDBMS driver effectively "commits" every (successful) SQL statement, and doesn't leave any transactions open. Hence, trying to set autocommit generates an error. Bear in mind, with autocommit set True, it's the RDBMS itself that commits transactions, not pyodbc. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Working with an older ODBC driver and receiving the "Transactions are not supported" error. When I attempt to pass in the connection string with "autocommit=false" I receive a popup message "Unrecognized Attribute 116" and then my terminal returns:
pyodbc.Error: ('HYC00', '[HYC00] [Sage][ODBC] (11470) Transactions are not supported. (11470) (SQLSetConnectAttr(SQL_ATTR_AUTOCOMMIT))').
I've also tried pyodbc.SQL_AUTOCOMMIT = False before making the connection but receive the same error.
Also tried cnxn = pyodbc.connect(constr,autocommit=False). Same error.
Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions