onRollBack event

  • Thread starter Thread starter graphicsxp
  • Start date Start date
G

graphicsxp

Hi,
I have a few stored procedures called from different methods in my
vb.net code and for different dataadapters, that all share the same
connection and transaction object. The rollback() method can be called
from various places.. But I'd like to execute some code each time it is
called. How can I fire an event when this method is called ?

thanks
 
first you need to declare an event

Public Event RollbackHappened()


then in your Rollback() method, just say

RaiseEvent RollbackHappened()

hope that helps
 
Hi,
Thanks for replying.
I do not have a Rollback method. The rollback method I was referring
to, is the one of my sqlTransaction object.
I can't do Addhandler myTransaction.Rollback(), AddressOf SomeFunction,
the compiler won't let me do that : Addhanler statement event operand
must be a dot-qualified expression or a simple name.

Anyone can help with that ?

thanks
 
Back
Top