[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

[sqr-users] SQL Server 2008 and commit

We're in the process of upgrading Peoplesoft and as part of that we are using 
SQL Server 2008 in the new Peoplesoft 9.0 environment.  
All of my SQRs work fine on the old server (which is SQL Server 2000) -- but on 
the new server I get this error:
Transaction count after EXECUTE indicates a mismatching number of BEGIN and 
COMMIT statements. Previous count = 1, current count = 0. 

Here is a sample program that demonstrates this problem. My output shows the 
'1', and then the error. Why can't I begin a new transaction? If I inspect 
@@TRANCOUNT before this, it's a one. But the 'begin transaction' should 
increase that to two and I would have nested transactions.  If I comment the 
'begin transaction' part, I get the error on the commit.  If I comment both the 
begin and the commit, my program runs.  But I'd kind of like to be able to 
define transactions and commit them when necessary.   What am I missing here?

show '1'
begin transaction

show '2'

commit transaction

show '3'

James Harris
Enterprise Application Analyst/Programmer
Information Technology Division
Frederick Community College 


sqr-users mailing list