|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
onRollBack eventHi,
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 -- -iwdu15 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 iwdu15 wrote: Show quoteHide quote > first you need to declare an event > > Public Event RollbackHappened() > > > then in your Rollback() method, just say > > RaiseEvent RollbackHappened() > > hope that helps > -- > -iwdu15 Anyone could help with that ?
graphicsxp a écrit : Show quoteHide quote > 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 > > iwdu15 wrote: > > first you need to declare an event > > > > Public Event RollbackHappened() > > > > > > then in your Rollback() method, just say > > > > RaiseEvent RollbackHappened() > > > > hope that helps > > -- > > -iwdu15
How to change printer's physical print margins thru VB coding?
2 pieces of the same code doing different things Placing a .lnk file on the desktop Threads Font with Bold and italic difference defaultdataview and a normal dataview? Going from A to Z Sending chr(255) to serial port How to save iamge in database? Positioning Other Applicaitons |
|||||||||||||||||||||||