The ODBC .NET Provider

The ODBC .NET provider is a set of managed classes (see Table A-6) that provides access to a database through any ODBC driver installed on your computer. To find the ODBC .NET driver, navigate to http://msdn.microsoft.com and search for ODBC .NET. If you have Version 1.1 of the .NET Framework SDK, ODBC .NET is included.

Table A-6. ODBC .NET provider classes

Interface

Implementing class

IDbConnection
OdbcConnection
IDbCommand
OdbcCommand

IDataParameter, IDbDataParameter

OdbcParameter

IDataReader, IDataRecord

OdbcDataReader

IDataAdapter, IDbDataAdapter

OdbcDataAdapter
IDbTransaction
OdbcTransaction

In .NET 1.1, these types are defined in the SystemData.dll assembly and contained in the System.Data.Odbc namespace. With earlier versions of .NET, you need to install the Microsoft.Data.Odbc.dll assembly (available form the MSDN site as a separate download), reference it, and import the Microsoft.Data.Odbc namespace.

Get ADO.NET in a Nutshell now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.