Hi,
I just start using pymssql (ver. 0.8.0), and noticed that just after open
the connection, there is a transaction active:
import pymssql
conn =3D pymssql.connect(host =3D "localhost",user =3D"joe", password=3D"xx=
x",
database=3D"testdb")
cur =3D conn.cursor()
cur.execute("select @@trancount")
cur.fetchone()
>>>(1,)
cur.close()
cur =3D conn.cursor()
cur.execute("commit tran")
cur.execute("select @@trancount")
cur.fetchone()
>>>(0,)
I've tried this code against 2 servers with the same result, one SQL Expres=
s
Edition 2005, and one SQL Server 2000 running as production server
I made a test with freetds against the same production server and there is
no transaction open at all.
My questions:
=BFis this a known behavior of pymssql?
=BFis there a parameter to avoid this behavior?
thanks in advance
--=20
Saludos!
Roberto
|