Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

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
public virtual ConnectionState State {get;}
public: __property virtual ConnectionState get_State();
public function get State() : ConnectionState;

Property Value

A bitwise combination of the ConnectionState values. The default is Closed.




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.


Platforms: .NET Compact Framework

.NET Framework Security: 

See Also

SqlCeConnection Class | SqlCeConnection Members | System.Data.SqlServerCe Namespace

© 2015 Microsoft