MSSQL fails the first transaction
Posted: 27.02.2013, 19:22
Hello,
I encountered the following problem on Zeos 7.0.3 When connected to a MSSQL database defining AutoCommit = false, TransactIsolation = tiReadCommitted, running 2 begin transaction, this can be verified in the log ZSQLMonitor or executing the query SELECT @@TRANCOUNT which returns 2.
This causes the generation of a nested transaction. to commit this transaction should run 2 commit, this does not happen and you lose the data of the first transaction.
As a solution, run a rollbak immediately after connecting to the database and discard the first transaction fails.
2013-02-27 14:51:34 cat: Connect, proto: mssql, msg: CONNECT TO "192.168.10.55\SQLEXPRESS" AS USER "sa"
2013-02-27 14:51:34 cat: Connect, proto: mssql, msg: USE INVENTARIO_FRIAR
2013-02-27 14:51:34 cat: Connect, proto: mssql, msg: set textlimit=2147483647
2013-02-27 14:51:34 cat: Execute, proto: mssql, msg: set textsize 2147483647 set quoted_identifier on
2013-02-27 14:51:34 cat: Execute, proto: mssql, msg: SET TRANSACTION ISOLATION LEVEL READ COMMITTED
2013-02-27 14:51:34 cat: Execute, proto: mssql, msg: BEGIN TRANSACTION
2013-02-27 14:51:34 cat: Execute, proto: mssql, msg: begin transaction
2013-02-27 14:51:34 cat: Execute, proto: mssql, msg: rollback
2013-02-27 14:51:34 cat: Execute, proto: mssql, msg: begin transaction
I encountered the following problem on Zeos 7.0.3 When connected to a MSSQL database defining AutoCommit = false, TransactIsolation = tiReadCommitted, running 2 begin transaction, this can be verified in the log ZSQLMonitor or executing the query SELECT @@TRANCOUNT which returns 2.
This causes the generation of a nested transaction. to commit this transaction should run 2 commit, this does not happen and you lose the data of the first transaction.
As a solution, run a rollbak immediately after connecting to the database and discard the first transaction fails.
2013-02-27 14:51:34 cat: Connect, proto: mssql, msg: CONNECT TO "192.168.10.55\SQLEXPRESS" AS USER "sa"
2013-02-27 14:51:34 cat: Connect, proto: mssql, msg: USE INVENTARIO_FRIAR
2013-02-27 14:51:34 cat: Connect, proto: mssql, msg: set textlimit=2147483647
2013-02-27 14:51:34 cat: Execute, proto: mssql, msg: set textsize 2147483647 set quoted_identifier on
2013-02-27 14:51:34 cat: Execute, proto: mssql, msg: SET TRANSACTION ISOLATION LEVEL READ COMMITTED
2013-02-27 14:51:34 cat: Execute, proto: mssql, msg: BEGIN TRANSACTION
2013-02-27 14:51:34 cat: Execute, proto: mssql, msg: begin transaction
2013-02-27 14:51:34 cat: Execute, proto: mssql, msg: rollback
2013-02-27 14:51:34 cat: Execute, proto: mssql, msg: begin transaction