Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

OracleConnection.StateChange Event

.NET Framework 1.1
Note: This namespace, class, or member is supported only in version 1.1 of the .NET Framework.

Occurs when the state of the connection changes.

[Visual Basic]
Public Event StateChange As StateChangeEventHandler
[C#]
public event StateChangeEventHandler StateChange;
[C++]
public: __event StateChangeEventHandler* StateChange;

[JScript] In JScript, you can handle the events defined by a class, but you cannot define your own.

Event Data

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.

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.

Remarks

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.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

OracleConnection Class | OracleConnection Members | System.Data.OracleClient Namespace

Show:
© 2015 Microsoft