SqlCeConnection.State Property
Note: This namespace, class, or member is supported only in version 1.1 of the .NET Framework.
Gets the current state of the connection.
[Visual Basic] Public Overridable ReadOnly Property State As ConnectionState _ Implements IDbConnection.State [C#] public virtual ConnectionState State {get;} [C++] public: __property virtual ConnectionState get_State(); [JScript] public function get State() : ConnectionState;
Property Value
A bitwise combination of the ConnectionState values. The default is Closed.
Implements
Remarks
The allowed state changes are:
- From Closed to Open, by using the Open method of the connection object.
- From Open to Closed, by using either the Close method or the Dispose method of the connection object.
Note Calling the State property increases application overhead because each call results in a call to the OLE DB DBPROP_CONNECTIONSTATUS property for an open connection.
Requirements
Platforms: .NET Compact Framework
.NET Framework Security:
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries From Partially Trusted Code
See Also
SqlCeConnection Class | SqlCeConnection Members | System.Data.SqlServerCe Namespace
Syntax based on .NET Framework version 1.1.
Documentation version 1.1.1.