Question: SQL_Autocommit_off is not implemented

39 views
Skip to first unread message

lxs...@gmail.com

unread,
Jul 3, 2016, 9:32:05 PM7/3/16
to pyodbc

I tried to use the pyODBC library to connect to a ODBC data source, but always got this error:


pyodbc.Error: ('HYC00', "[HYC00] The 'SQL_AUTOCOMMIT_OFF' for the 'SQL_ATTR_AUTO COMMIT' is not implemented. (0) (SQLSetConnnectAttr(SQL_ATTR_AUTOCOMMIT))")


when use pyodbc.connect("DNS=...")


I also tried the pypyodbc library and got the same error. Any ideas? Thank you very much!

Michael Kleehammer

unread,
Jan 19, 2017, 5:54:45 PM1/19/17
to pyodbc
That is an error from your driver, not from pyodbc.  Apparently your driver (and most likely database) does not support autocommit being turned off.  What database are you using?

You'll need to add "autocommit=True" to the connection:

    cnxn = pyodbc.connect(connectionstr, autocommit=True)

Reply all
Reply to author
Forward
0 new messages