
Auto-Done configured but transaction commited.
I have a VB component that has 1 function which updates my SQL Server.
This component is configured as "Requires Transaction" and the method I'm
talking about it configured to "Automatically Deactive when returns"
In the function, I update the DB using ADO, terminate the connection and
then raise a VB Error. From what I understand, COM+ should examine this
failed HRESULT and set the consistency bit to false for the component, and
then deactivate it.
Well, it doesn't.
The deactivation occurs. But the transaction succeedes and the changes are
made to the DB.
The strange thing is that if I call IContextState::GetDeactivateOnReturn
inside my function I always get FALSE... Shouldn't this be set to TRUE if
configured properly in COM+?
That's the probelm then. I'd hate to start writing those SetComplete/Aborts
myself, and I'd sure like to take advantage of the Auto-Done feature.
--
Assaf Lavie.