how can i use transaction ?

Apr 11, 2008 at 5:23 PM
Edited Apr 11, 2008 at 5:27 PM
HI,
i am calling more than one storedprocedure ata time to perform a function.
while clicking a particluar button, i wanna insert values into multiple tables, and in case while doing these any exception comes after inserting values to third table, but inserted values to the first and the second table.

In this case i wanna roll back the previous operation ...

how can i perform this ? is it possible ?
if possible where can i add that ? in the SQL Server or, while creating the service, in repository classes....

please i need some assisatnce regarding this...
please help me with this.....

nimi
May 2, 2008 at 7:17 AM
Use a TransactionScope around your repository calls. They'll all be automatically enlisted in the transaction.