OdbcConnection.Open Method


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

 virtual void Open();
public void Open ();
override this.Open : unit -> unit
Public Sub Open ()


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.

Applies to

See also