Hello all,
I have one method that starts a transaction and passes it to three methods to do an updates.
private void A()
{
int intRecordsAffected;
Transaction T = GlobalConnection.BeginTransaction();
intRecordsAffected = B(T);
intRecordsAffected = intRecordsAffected + C(T);
intRecordsAffected = intRecordsAffected+ D(T);
MessageBox.Show(intRecordsAffected.ToString());
T.Commit();
}
If an exception occurs in B, C, or D how can I make A aware of it so that it can rollback
Thanks,
Eisen
.NET Development25
|