| Devart.Common Namespace > DbConnectionBase Class : StateChange Event (DbConnectionBase) |
Occurs when the state of the connection changes.
[Visual Basic]
Public Event StateChange() As StateChangeEventHandler [C#]
public event StateChangeEventHandler StateChange();The event handler receives an argument of type
| Property | Description |
|---|---|
| CurrentState | Gets the new state of the connection. The connection object will be in the new state already when the event is fired. |
| OriginalState | Gets the original state of the connection. |
The StateChange event is raised immediately after the State changes from Closed to Opened, or from Opened to Closed.
If an event handler throws an exception from within the StateChange event, the exception propagates to the caller of the Open or Close method.
DbConnectionBase Class | DbConnectionBase Members
© 2002 - 2013 Devart. All Rights Reserved.