One of my co-workers is building a C# windows app that needs to grab a set of data and then row-by-row alter that data. If the system encounters a problem at any step in the process, it needs to roll back all of the changes.
The process he has created works well when dealing with smaller sets of data, but as soon as the number of rows get larger, it starts to puke.
The process of altering the data needs to happen in the windows app. What is the best way to handle large data changes atomically in a windows app?
Thank you.
Edit-
We are using a background thread with this process.
I apologize - I don't think I articulated the quandary we're in. We are using transactions right now with the system, I don't know if we're doing it effectively, so I'll definitely review the notes below.
We were thinking that we could spin off additional worker threads to get the work done more quickly, but assumed we would lose our atomic capabilities. Then we were thinking that maybe we could pull all the data into a data table, make changes in that object and then persist the data to the database.
So I was just going to see if someone had a brilliant way to handle this type of situation. Thanks for the comments so far.