Currently I am using a third party software XML API to implement different operations (when using this XML API, it's doing saving, updating the tables opeations without direct database connections). But the problem is how to use transaction-like operations to make sure two operations is atomic? i.e. In my program, i'm using two XML API functions:SaveObjectToA() and SaveObjectToB() to save object to two places. If either of SaveObjectToA() or SaveObjectToB() failed, then both functions needs to be rolled back (i.e. if A is not saved, then B should not be saved either).
I tried to use:
using(TransactionScope scope=new TransactionScope())
But nothing happend when SaveObjectToB() failed and SaveObjectToA() still got saved, there is no rollback. Please advise. Thanks a lot.