TMSStoredProc.execute
Posted: Tue 06 Jul 2010 23:18
Hi,
I am using a transaction with an T-SQL stored procedure, where (for some reason) transaction is commited and a new one started, execute starts another transaction.
t-sql SP:
create procedure mySP
as
begin
commit
begin tran
return 0
end
Conn.StartTransaction;
... // select @@trancount = 1 :: OK
msSP.Execute
...// select @@trancount = 2: ????
Conn.Commit. // select @@trancount = 1 :: OK
if I remove *commit/begin tran* from stored procedure, then everything works as expected. Is there something I should specify to avoid TmsStoredProc to start additional transaction?
Rgds,
Frenk
I am using a transaction with an T-SQL stored procedure, where (for some reason) transaction is commited and a new one started, execute starts another transaction.
t-sql SP:
create procedure mySP
as
begin
commit
begin tran
return 0
end
Conn.StartTransaction;
... // select @@trancount = 1 :: OK
msSP.Execute
...// select @@trancount = 2: ????
Conn.Commit. // select @@trancount = 1 :: OK
if I remove *commit/begin tran* from stored procedure, then everything works as expected. Is there something I should specify to avoid TmsStoredProc to start additional transaction?
Rgds,
Frenk