System.Data.Odbc.OdbcConnection.Open Method

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

Syntax

public override void Open ()

Remarks

The System.Data.Odbc.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 System.Data.Odbc.OdbcConnection goes out of scope, the connection it represents does not close automatically. Therefore, you must explicitly close the connection by calling OdbcConnection.Close, Dispose, or by placing the connection within a Using statement.

Requirements

Namespace: System.Data.Odbc
Assembly: System.Data (in System.Data.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0