Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / August 2006

Tip: Looking for answers? Try searching our database.

onRollBack event

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
graphicsxp - 31 Jul 2006 15:16 GMT
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
iwdu15 - 31 Jul 2006 15:30 GMT
first you need to declare an event

Public Event RollbackHappened()

then in your Rollback() method, just say

RaiseEvent RollbackHappened()

hope that helps
Signature

-iwdu15

graphicsxp - 07 Aug 2006 09:40 GMT
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

> first you need to declare an event
>
[quoted text clipped - 5 lines]
>
> hope that helps
graphicsxp - 07 Aug 2006 20:41 GMT
Anyone could help with that ?

graphicsxp a écrit :

> Hi,
> Thanks for replying.
[quoted text clipped - 17 lines]
> >
> > hope that helps

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.