Hi
Yesterday ,I received the same message like
"There are uncommitted transactions. Do you wish to commit these transactions before closing the window?"
and fully surprised that why it is coming .
While googling I found so many reply to check the setting of Sql server , But I was not satisfied with all the reply then I started looking in to the code.
I changed the format like
BEGIN TRY
BEGIN TRAN T1
Insert statement
Insert statement
Insert statement
Insert statement
COMMIT TRAN T1
END TRY
BEGIN CATCH
if @@ERROR <> 0
ROLLBACK TRAN T1
END CATCH
And after this modification while closing the code it was not throwing any message .