共用方式為


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

適用於

另請參閱