Hello friends,
Now I know that we can enclose a bunch of SQL queries (CommandText of Command object) in a transaction context. That way, if any of the queries fail, the entire transaction is rolled back. The command object allows us to do that. Now, my problem is that I have a bunch of methods, each one of which in turn fires a stored procedure to achieve the above functionality (multiple operations on DB). I call these methods one after other and all of these DB operations take place in a particular order. Now, is it possible that I can enclose this entire set of method calls in a transaction context? In the sense, all the stored procedures that are fired should be rolled back if a stored procedure fails.
Your suggestions are highly appreciated.
Thank you,
DNM
Now I know that we can enclose a bunch of SQL queries (CommandText of Command object) in a transaction context. That way, if any of the queries fail, the entire transaction is rolled back. The command object allows us to do that. Now, my problem is that I have a bunch of methods, each one of which in turn fires a stored procedure to achieve the above functionality (multiple operations on DB). I call these methods one after other and all of these DB operations take place in a particular order. Now, is it possible that I can enclose this entire set of method calls in a transaction context? In the sense, all the stored procedures that are fired should be rolled back if a stored procedure fails.
Your suggestions are highly appreciated.
Thank you,
DNM