As a Visual Basic programmer, you must be aware of the MTSTransactionMode property. Setting this to anything other than
NoTransactions will invoke Microsoft transactions. Please refer to COM+ services documentation for the complete reference of this feature.
The following example demonstrates use of Microsoft Transactions. In order for the calls to GetObjectContext to succeed, you must set the
MTSTransactionMode property to something other than
NoTransactions. Using Microsoft Transactions will allow Microsoft’s Transaction Coordinator to do a two-phase commit.
However, you could rewrite this business object using ADO transactions (with a connection object). This would allow you to set the MTSTransactionMode property to
NoTransactions. Without Microsoft Transactions, you no longer have the overhead of the two-phase commit. Also, objects that do not support transactions are allowed to stay resident in memory, whereas those that do are constructed and destroyed on each reference.