OleDbConnection.State Propiedad

Definición

Obtiene el estado actual de la conexión.Gets the current state of the connection.

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

Valor de propiedad

ConnectionState

Combinación bit a bit de los valores de ConnectionState.A bitwise combination of the ConnectionState values. El valor predeterminado es Closed.The default is Closed.

Implementaciones

Atributos

Comentarios

A continuación se indican los cambios de estado permitidos:The following are allowed state changes:

Nota

En la versión anterior de la .NET Framework, al llamar a la State propiedad se aumentó la sobrecarga de la aplicación porque cada llamada produjo una llamada a la propiedad DBPROP_CONNECTIONSTATUS OLE DB para una conexión abierta.In previous version of the .NET Framework, calling the State property increased application overhead because each call caused a call to the OLE DB DBPROP_CONNECTIONSTATUS property for an open connection. Con el lanzamiento del .NET Framework 2,0, ya no es un problema.With the release of the .NET Framework 2.0, this is no longer an issue.

Se aplica a