IDbConnection::State Property
.NET Framework (current version)
Gets the current state of the connection.
Assembly: System.Data (in System.Data.dll)
The allowed state changes are:
From Closed to Open, using the Open method of the Connection object.
From Open to Closed, using either the Close method or the Dispose method of the Connection object.
The following example creates an instance of a derived class, OleDbConnection, sets its ConnectionString, and displays its State.
.NET Framework
Available since 1.1
Available since 1.1
Show: