Transaction management

  • We have an application which uses ASP.NET and C#.

    One particular page calls 3 stored procedure one after other. How do I call these 3 sp in a transaction. so that I commit all three or none.

    Thanks

  • You could use TSQL command BEGIN TRANSACTION and COMMIT in your main stored procedure that will calls the other three stored procedure. Be sure to make your three stored procedures in the transaction run as short as possible and you may experience blocking issues.

  • These sp's are called by the page so and called by the page individually.

    let me know if we can set autocommit off and then commit from the page.

    Thanks

  • You can start the transaction from the connection object being used by the page. Call the three procedures in turn, then commit (or rollback).

    Guarddata-

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply