ConnectionState ConnectionState ConnectionState ConnectionState Enum

定义

描述与数据源的连接的当前状态。Describes the current state of the connection to a data source.

此枚举有一个 FlagsAttribute 属性,允许按位组合成员值。

public enum class ConnectionState
[System.Flags]
public enum ConnectionState
type ConnectionState = 
Public Enum ConnectionState
继承
ConnectionStateConnectionStateConnectionStateConnectionState
属性

字段

Broken Broken Broken Broken 16

与数据源的连接中断。The connection to the data source is broken. 只有在连接打开之后才可能发生这种情况。This can occur only after the connection has been opened. 可以关闭处于这种状态的连接,然后重新打开。A connection in this state may be closed and then re-opened. (该值是为此产品的未来版本保留的。)(This value is reserved for future versions of the product.)

Closed Closed Closed Closed 0

连接已关闭。The connection is closed.

Connecting Connecting Connecting Connecting 2

连接对象正在与数据源连接。The connection object is connecting to the data source.

Executing Executing Executing Executing 4

连接对象正在执行命令。The connection object is executing a command. (该值是为此产品的未来版本保留的。)(This value is reserved for future versions of the product.)

Fetching Fetching Fetching Fetching 8

连接对象正在检索数据。The connection object is retrieving data. (该值是为此产品的未来版本保留的。)(This value is reserved for future versions of the product.)

Open Open Open Open 1

连接处于打开状态。The connection is open.

注解

ConnectionState通过使用值State的属性OleDbConnectionSqlConnection对象。The ConnectionState values are used by the State property of the OleDbConnection and SqlConnection objects.

备注

此枚举中的值不用于用作一组标志。The values in this enumeration are not designed to be used as a set of flags.

适用于