Hi,
I have not used sql transactions in my code in asp.net. How to begin and end it.. ?
This way
CREATE PROCEDURE Test AS BEGIN SET NOCOUNT ON; BEGIN TRY BEGIN TRANSACTION --Queries here COMMIT TRANSACTION END TRY BEGIN CATCH ROLLBACK TRANSACTION END CATCH END GO
Though you can also do in code. I would suggest creating a stored proc as I gave in my last reply and add 2 insert queries as that will be more effecient
Anyways
http://www.knowdotnet.com/articles/transactions.html
http://www.codeproject.com/Articles/10223/Using-Transactions-in-ADO-NET
© COPYRIGHT 2024 ASPSnippets.com ALL RIGHTS RESERVED.