Export (0) Print
Expand All

OdbcFactory.CreateConnection Method

Returns a strongly-typed DbConnection instance.

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

public override DbConnection CreateConnection()

Return Value

Type: System.Data.Common.DbConnection
A new strongly-typed instance of DbConnection.

The following code fragment returns a strongly-typed DbConnection instance:

OdbcFactory newFactory = OdbcFactory.Instance;
DbConnection cmd = newFactory.CreateConnection();

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft