This documentation is archived and is not being maintained.

SqlCeConnection.Open Method

Note: This namespace, class, or member is supported only in version 1.1 of the .NET Framework.

Opens a database connection with the property settings specified by the ConnectionString.

[Visual Basic]
Public Overridable Sub Open() Implements IDbConnection.Open
public virtual void Open();
public: virtual void Open();
public function Open();




Exception Type Condition
InvalidOperationException The connection is already open.
SqlCeException A connection-level error occurred while opening the connection.


This method establishes a new connection to the data source.

Note   If the SqlCeConnection goes out of scope, it is not closed. You must explicitly close the the connection by calling Close or Dispose.


Platforms: .NET Compact Framework

.NET Framework Security: 

See Also

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