Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple COM calls under a single transaction

Status
Not open for further replies.

Technokrat

Programmer
Jul 20, 2001
92
US
Is there a way to encapsulate multiple COM calls under a single transaction? So, its an ALL or NOTHING deal.

For example, let say you have existing COM to handle updating records to six different tables. One is the master, and 5 tables are subordinate. Is there a way to embed the calls so that if any ONE fails, the transactions on all six are rolled back?
 
Have you browsed through the PowerPoint presentation at COM+ Transactions? It gives a nice overview of the process.

The topic is a bit broad to expect much in the way of a code snippet. There's more to it than specific code.

An alternative might be to use a transactional stored procedure written with the same rules in mind.
 
I guess I was hoping for a solution that leveraged the existing COM modules. There is a setting that indicates MTSTransactionMode, and I guess I was thinking there may be a way to call type 3 - UsesTransaction modules in such a way that they are packaged inside of a type 2 - RequiresTransaction COM.
 
You are thinking correctly. I would suggest that you investigate the ContextObject object and its methods.

HTH

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top