Hi,
I have not used sql transactions in my code in asp.net. How to begin and end it.. ?
What version of SQL Server you are using?
Sir,
I am using sql server 2005 with VS 2008
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
No sir,
I want to use int in asp.net code.. At single save click i need to save data in 2 tables.. Both the tables should save else none of them should be saved
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.