Auto-Done configured but transaction commited. 
Author Message
 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.



Mon, 07 Jul 2003 19:24:27 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. TRANSACTION IS COMMITED ANYWAY

2. Auto Configure Quick Launch

3. Prob: Error Doing Connection.Execute While In Transaction

4. auto uninstall ? can it be done

5. not to auto update while doing addnew

6. MTS commited data when it shouldn't

7. To Transaction or Not to Transaction that is the question

8. ADODB TRANSACTION ADO ERROR No Transaction is Active

9. Why to use COM+ transaction and not just SQL Server transaction

10. Reqiured Transaction and Required New Transaction

11. Cannot connect to the transaction manager or the transaction (-2147168229)

12. ADODB TRANSACTION ADO ERROR No Transaction is Active

 

 
Powered by phpBB® Forum Software