Connection Class Events

The ADO .NET approach to events is a complete reversal of the ADO approach. ADO had events for each step of the process: WillConnect, Connected, AlmostConnected. (Just kidding about that last one; but it did have too many events.) The ADO .NET people went in the opposite direction. The ADO .NET Connection classes have only two events. Actually, all of the .Net framework is light on events. Instead of different events, the ADO .NET designers use different EventArgs object types to pass more specific information about why the event was fired. The Connection classes are no different.

The StateChanged Event

The StateChanged event fires whenever the Connection object’s State property changes. If you need to know the exact ...

Get ADO.NET Programming in Visual Basic™ .NET now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.