문제

I have a IIS hosted Python application and the front application always failed to save.

I noticed that there are a lots of transaction count more than 0 then rollback when SQL Profiler running and those application name is IIS.

Sometime it did commit when transaction count more than 0 as well.

I wondering what does that mean and where can I locate the script that execute this control.

Will it be caused by query design problem? Much appreciate for any advice.

IF @@TRANCOUNT > 0
        ROLLBACK TRANSACTION;
도움이 되었습니까?

해결책

The code you posted:

IF @@TRANCOUNT > 0
   ROLLBACK TRANSACTION;

says to rollback if there is any transaction active.

That's probably not what you want!

I suspect what you actually want is this:

IF @@TRANCOUNT > 0
   COMMIT TRANSACTION;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top