SqlConnection.State 属性

定义

最近在连接上执行网络操作时表示 SqlConnection 的状态。

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

属性值

ConnectionState 枚举。

属性

注解

返回一个 ConnectionState 枚举,指示 的状态 SqlConnection。 关闭并重新打开连接将刷新 的值 State

适用于