Transaction-like operations in calling two related functions in .NET?

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())
SaveObjectToA() ;
SaveObjectToB() ;

But nothing happend when SaveObjectToB()  failed and SaveObjectToA() still got saved, there is no rollback. Please advise. Thanks a lot.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

The XML API provided by the third party must provide rollback support, or else you will need to code wrappers that are transaction-aware.
heyday2004Author Commented:
They didnt provide that or I dont have access to that. Any other detailed suggestions or links to get transaction like wrappers to make sure the two function calls are executed or not executed together? Thanks.
Again, without the library providing details on *how* to rollback (or yourself figuring out what it does to see if you can possibly roll it back, if internal state isn't touched too much) you can't really do it.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Agreed with icr.
Thanks for the points :)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.