OdbcConnection::Open Method ()
Opens a connection to a data source with the property settings specified by the ConnectionString.
Assembly: System.Data (in System.Data.dll)
| Exception | Condition |
|---|---|
| NotSupportedException | The functionality of this method is unsupported in the base class and must be implemented in a derived class instead. |
The OdbcConnection draws an open connection from the connection pool if one is available. Otherwise, it establishes a new connection to the data source.
Note |
|---|
If the OdbcConnection goes out of scope, the connection it represents does not close automatically. Therefore, you must explicitly close the connection by calling Close, Dispose, or by placing the connection within a Using statement. |
Available since 1.1
