OdbcConnection.Open Method ()


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Opens a connection to a data source with the property settings specified by the ConnectionString.

Namespace:   System.Data.Odbc
Assembly:  System.Data (in System.Data.dll)

public override void Open()

Exception Condition

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.


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.

.NET Framework
Available since 1.1
Return to top