Dela via


SqlConnection.State Property

Definition

Indicates the state of the SqlConnection during the most recent network operation performed on the connection.

public:
 virtual property System::Data::ConnectionState State { System::Data::ConnectionState get(); };
[System.ComponentModel.Browsable(false)]
public override System.Data.ConnectionState State { get; }
public override System.Data.ConnectionState State { get; }
[<System.ComponentModel.Browsable(false)>]
member this.State : System.Data.ConnectionState
member this.State : System.Data.ConnectionState
Public Overrides ReadOnly Property State As ConnectionState

Property Value

An ConnectionState enumeration.

Attributes

Remarks

Returns an ConnectionState enumeration indicating the state of the SqlConnection. Closing and reopening the connection will refresh the value of State.

Applies to