.NET Framework 1.1
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 [C#] public virtual void Open(); [C++] public: virtual void Open(); [JScript] public function Open();
|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:
- 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