SqlConnection.State 属性

定义

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

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

属性值

ConnectionState 枚举。

实现

属性

注解

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

适用于

另请参阅