SqlConnectionState Enumeration
Namespace: System.Data.SqlClient
Assembly: System.Data.dll
Assembly: System.Data.dll
Specifies the state of the SqlConnection.
Members
Closed
The connection object is closed.
Connecting
The connection object is attempting to establish a connection to the server.
Executing
The connection object is executing a command.
FetchingRows
The connection object is retrieving rows from the server.
Open
The connection object is open and ready for use.
Broken
The connection object has encountered an error and is no longer usable.
Syntax
C#
public enum SqlConnectionState {
Closed,
Connecting,
Executing,
FetchingRows,
Open,
Broken
}
Visual Basic
Public Enum SqlConnectionState
Closed
Connecting
Executing
FetchingRows
Open
Broken
End Enum
Remarks
The SqlConnectionState enumeration describes the current state of the SqlConnection object. Applications can check the State
property of a SqlConnection object to determine its current state.