Page 1 of 1

TMSStoredProc.execute

Posted: Tue 06 Jul 2010 23:18
by FrenkR
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

Posted: Thu 08 Jul 2010 13:21
by Challenger
I could not reproduce this problem. Please specify the version of server you are using. Do you use Native Client.

version

Posted: Tue 13 Jul 2010 20:37
by FrenkR
I am using standard SQL connection to SQL server 2005/2008 (no network library specified). I believe that my version is 3.80 (last before version 4). on my site, it is 100% reproducible.

I will download 4.80 and report results.
Rgds,
Frenk