mkleehammer / pyodbc

Python ODBC bridge
https://github.com/mkleehammer/pyodbc/wiki
MIT No Attribution
2.92k stars 561 forks source link

Question about transaction #1161

Closed zlev-intel closed 1 year ago

zlev-intel commented 1 year ago

Hi, I'm executing (exec query) the stored procedure, which have the transaction inside. I'm setting autocommit to false, but when I see results it looks like the transaction is opened by PYODBC too. I found in internet the following:

Please first make sure you have looked at:

Environment

To diagnose, we usually need to know the following, including version numbers. On Windows, be sure to specify 32-bit Python or 64-bit:

Issue

Often it is easiest to describe your issue as "expected behavior" and "observed behavior".

v-chojas commented 1 year ago

If you turn off autocommit, then it will create an explicit transaction that you need to commit manually.

What is the actual problem the transaction is causing?

zlev-intel commented 1 year ago

I have a transaction inside stored procedure, so it caused nested transaction...