<
Transactional(TransactionalTypes.EnterpriseServices)> _
Protected
Overrides Sub DataPortal_Execute()
_NewRider = CreateRider()
dothis(_NewRider) 'uses dataportal to access database
dothat(_NewRider) 'uses dataportal to access database
dosomethingelse(_NewRider) 'uses dataportal to access database
scope.Complete()
End Using
End Sub
It might be that you can't mix enterprise services and transactionscope transactions.
When you mark your DataPortal_XYZ method as Transactional(EnterpriseServices) the data portal routes your call through a COM+ component that requires a COM+ transaction. So by the time your DataPortal_XYZ method is invoked, you are already inside an active COM+ transaction using the DTC.
I've never tried creating a TransactionScope object _inside_ an existing COM+ transaction, and rather suspect it isn't a valid scenario.
Copyright (c) Marimer LLC