See Also

DbConnectionBase Class  | DbConnectionBase Members

Language

Visual Basic

C#

Show All

See AlsoLanguagesDevart.Data.UniversalSend comments on this topic.

StateChange Event

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();

Remarks

The event handler receives an argument of type StateChangeEventArgs containing data related to this event. The following StateChangeEventArgs properties provide information specific to this event.
PropertyDescription
CurrentStateGets the new state of the connection. The connection object will be in the new state already when the event is fired.
OriginalStateGets 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.

See Also

DbConnectionBase Class  | DbConnectionBase Members

 

 


© 2002 - 2013 Devart. All Rights Reserved.