TMSStoredProc.execute

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
FrenkR
Posts: 6
Joined: Tue 06 Jul 2010 23:09

TMSStoredProc.execute

Post by FrenkR » 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

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Thu 08 Jul 2010 13:21

I could not reproduce this problem. Please specify the version of server you are using. Do you use Native Client.

FrenkR
Posts: 6
Joined: Tue 06 Jul 2010 23:09

version

Post by FrenkR » Tue 13 Jul 2010 20:37

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

Post Reply