tanrj / pyodbc

Automatically exported from code.google.com/p/pyodbc
MIT No Attribution
0 stars 0 forks source link

pyodbc seems to always use autocommit with Oracle #8

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Is this a known problem?

I'm using the Oracle 10g client on WinXP and data is written to the
database even though I haven't set autocommit (or set it explicitely to
false) and never call the commit() method.

Original issue reported on code.google.com by ch.zwerschke@gmail.com on 3 Dec 2008 at 3:05

GoogleCodeExporter commented 8 years ago
It's not a known issue.  It is possible that the call to set autocommit is 
failing
and pyodbc ate the error.

Can you turn on ODBC tracing and try a very simple test?  Maybe just connect, 
insert
one record, then exit without committing?

Original comment by mkleehammer on 3 Dec 2008 at 3:51

GoogleCodeExporter commented 8 years ago
Sorry, false alarm. The problem was an alter trigger command in my transaction. 
I
forgot that in Oracle, as any DDL statement, this will automatically cause a 
commit
on the current transaction. After moving the DDL outside the transaction, 
everything
worked as expected. Thanks for the quick response.

Original comment by ch.zwerschke@gmail.com on 3 Dec 2008 at 5:31

GoogleCodeExporter commented 8 years ago

Original comment by mkleehammer on 3 Dec 2008 at 7:02

GoogleCodeExporter commented 8 years ago

Original comment by mkleehammer on 21 Nov 2010 at 4:43