ConnectionState Enumeration
Describes the current state of the connection to a data source.
This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.
[Visual Basic] <Flags> <Serializable> Public Enum ConnectionState [C#] [Flags] [Serializable] public enum ConnectionState [C++] [Flags] [Serializable] __value public enum ConnectionState [JScript] public Flags Serializable enum ConnectionState
Remarks
The ConnectionState values are used by the State property of the OleDbConnection and SqlConnection objects.
Note OleDbConnection and SqlConnection support only the Open and Closed ConnectionState values.
Members
| Member name | Description | Value |
|---|---|---|
| Broken Supported by the .NET Compact Framework. | The connection to the data source is broken. This can occur only after the connection has been opened. A connection in this state may be closed and then re-opened. (This value is reserved for future versions of the product.) | 16 |
| Closed Supported by the .NET Compact Framework. | The connection is closed. | 0 |
| Connecting Supported by the .NET Compact Framework. | The connection object is connecting to the data source. (This value is reserved for future versions of the product.) | 2 |
| Executing Supported by the .NET Compact Framework. | The connection object is executing a command. (This value is reserved for future versions of the product.) | 4 |
| Fetching Supported by the .NET Compact Framework. | The connection object is retrieving data. (This value is reserved for future versions of the product.) | 8 |
| Open Supported by the .NET Compact Framework. | The connection is open. | 1 |
Requirements
Namespace: System.Data
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework
Assembly: System.Data (in System.Data.dll)