I am new to C #. So I'm just wondering if anyone can help me figure out how C # works with a transaction? Because I'm a little confused by the definition. However, let me tell you a little about my problem. So you know what I'm trying to achieve.
I have three table adapters declared for three different datasets, such as:
logTableAdapter logAdap = new logTableAdapter(); measTableAdapter measAdap = new measTableAdapter(); valueTableAdapter valueAdap = new valueTableAdapter();
Data Import Process:
- First, I insert a log entry using the logAdap.insert () method.
- Scroll through the excel file to capture the dimensions and start the insert using the measAdap.insert () method.
- Preliminary measurement. I insert values through the valueAdap.insert () method.
So my question is, since dimension and value have nested relationships. How can I create a nested transaction and when an error occurs somewhere (insert I / O), I just want to undo everything I did. That is, I just want to go back to the point before I inserted the journal entry.
Mystic
source share