Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

Transaction Not commiting when run on wrong DB

$
0
0
The transaction is not getting commited or rollback when run in different db. The execution might throw error but its not commiting for below BEGIN TRY BEGIN TRANSACTION UPDATE dbo.test SET Arrival= '20160928 11:30:00 AM', Departure= '20160928 12:00:00 PM' WHERE ID= 1; COMMITEND TRYBEGIN CATCH IF @@TRANCOUNT > 0 ROLLBACKEND CATCH

Viewing all articles
Browse latest Browse all 3145

Trending Articles