.NET Framework Data Provider for ODBC

This .NET Framework Wrapper Class Library is provided by Microsoft. The main functionality of the wrapper class library is contained in the file System.Data.dll.

Add a reference to the assembly System.Data and include the System.Data.Odbc namespace. Instantiate a new OdbcConnection connection object. Set the connection string and open the connection.

VB.NET code sample
Imports System.Data.Odbc
Dim myConnection As OdbcConnection = New OdbcConnection()
myConnection.ConnectionString = myConnectionString
myConnection.Open()
' execute queries, etc
myConnection.Close()
C# code sample
using System.Data.Odbc;
OdbcConnection myConnection = new OdbcConnection();
myConnection.ConnectionString = myConnectionString;
myConnection.Open();
// execute queries, etc
myConnection.Close();

Description

  In .NET framework version 1.0 the driver was contained in a separate download and accessed through the <em>Microsoft.Data.ODBC</em> namespace, since 1.1 it's in .Net framework and contained in the <em>System.Data.Odbc</em> namespace.

  The .NET Framework Data Provider for ODBC uses native ODBC Driver Manager through COM interop to enable data access. The OdbcConnection wraps/bridges to the underlying driver sprecified in the connection string using the keyword "Driver" or "DSN" (if the connection should obtain its settings from an ODBC DSN). This means that virtually every ODBC driver can be used through this class library.
  
  The .NET Framework Data Provider for ODBC supports both local and distributed transactions. For distributed transactions, the .NET Framework Data Provider for ODBC, by default, automatically enlists in a transaction. Depending on the functionality supported by the native ODBC driver, some methods or properties of an OdbcConnection object may not be available.

More info about this wrapper class library can be found at the Microsoft product page.

Download

There is no '.NET Framework Data Provider for ODBC' installation package to download. (if you know about an installation package URL you can contribute to the community by submitting the info to us through this message form)

Connection Strings

The .NET Framework Data Provider for ODBC wrapper class library can be used to connect to the following data sources by using the following connection string references:

SQL ServerSQL Server 2019SQL Server 2017SQL Server 2016SQL Server 2014SQL Server 2012SQL Server 2008SQL Server 2005SQL Server 2000SQL Server 7.0OracleIBM DB2MySQLSybase AdaptiveInformixPostgreSQLUniVerseAS/400FirebirdParadoxMimer SQLPervasiveCachéNetezza DBMSZIMInterbaseIngresSQLBaseTeradataDBMakerValentinaSQLiteProgressExcelExcel 97Excel 2000Excel 2002Excel 2003Excel 2007Excel 2010Excel 2013TextfileAccessAccess 97Access 2000Access 2002Access 2003Access 2007Access 2010Access 2013Visual FoxProDBF / FoxProFilemakerAzure SQL DatabaseIntuit QuickBaseComposite Information ServerLotus NotesDSNComputerEaseSybase Advantage

Providers

.NET Framework Data Provider for SQL Server Microsoft SqlClient Data Provider for SQL Server CData ADO.NET Provider for Excel Microsoft OLE DB Driver for SQL Server Microsoft ODBC Driver 17 for SQL Server Microsoft ACE OLEDB 12.0 .NET Framework Data Provider for OLE DB Microsoft Jet OLE DB 4.0 MySQL Connector/Net Microsoft ODBC Driver 13 for SQL Server SQL Server Native Client 10.0 OLE DB Provider SQL Server Native Client 10.0 ODBC Driver Microsoft ODBC Driver 11 for SQL Server SQL Server Native Client 11.0 OLE DB Provider SQL Server Native Client 11.0 ODBC Driver ASE ADO.NET Data Provider SQL Native Client 9.0 OLE DB Provider SQL Native Client 9.0 ODBC Driver Microsoft Access ODBC Driver IBPhoenix Open Source ODBC Driver (aka Firebird ODBC driver) Microsoft Access accdb ODBC Driver SQLite.NET Microsoft OLE DB Provider for SQL Server Advantage .NET Data Provider .NET xlReader for Microsoft Excel Oracle Data Provider for .NET / ODP.NET Oracle Provider for OLE DB .NET Framework Data Provider for Oracle MySQL Connector/ODBC 5.1 SQLXML 4.0 OLEDB Provider Microsoft SQL Server ODBC Driver MySQL Connector/ODBC 5.2 Advantage ODBC Driver Npgsql IBM i Access ODBC driver Microsoft Excel ODBC Driver Finisar.SQLite ADO.NET Data Provider Microsoft Excel 2007 ODBC Driver DB2 .NET Data Provider MySQL Connector/ODBC 3.51 Advantage OLE DB Provider Sybase ASE OLE DB Provider Adaptive Server Enterprise ODBC driver Mimer Data Provider QuNect ODBC for QuickBase PostgreSQL ODBC Driver (psqlODBC) SIBPROvider Interbase OLE DB Provider SQLBase .NET Data Provider VFP OLE DB Provider SQLBase ODBC Adaptive Server Anywhere ODBC Driver Context Connection MSDataShape Microsoft ODBC for Oracle IBM DB2 Driver for ODBC and CLI MyODBC 2.50 Firebird ADO.NET Data Provider Pervasive OLE DB Provider InterSystems ODBC Valentina ODBC Driver U2.Net Oracle in OraClient11g_home1 Ingres .NET Data Provider SQLXML 3.0 OLEDB Provider Microsoft OLE DB Provider for Oracle Microsoft OLEDB provider for DB2 Adaptive Server Anywhere OLE DB Provider Sybase SQL Anywhere (former Watcom SQL) ODBC driver IBM Informix OLE DB Provider PostgreSQL OLE DB Provider Microsoft Paradox Driver IBM Client Access OLE DB provider IBM Client Access ODBC driver IBM iSeries Access ODBC driver Progress ODBC Driver Easysoft ODBC Intersolv InterBase ODBC Driver Mimer ODBC Driver Pervasive PSQL ADO.NET Data Provider Microsoft Text ODBC Driver Microsoft Visual FoxPro ODBC Driver Microsoft dBASE ODBC Driver Composite ODBC ODBC DSN Zim Technologies Inc. ODBC Oracle in OraHome92 Oracle in XEClient Microsoft ODBC Driver for Oracle dotConnect for Oracle IBM OLE DB Provider for DB2 MySQL OLEDB eInfoDesigns.dbProvider SevenObjects MySqlClient dotConnect for MySQL (former MyDirect.NET and Core Labs MySQLDirect.NET) MySQLDriverCS Intersolv 3.60 Intersolv 3.10 IBM Informix .NET Provider IBM Informix ODBC Driver Informix-CLI 2.5 Luxena dbExpress driver for Informix Pro dotConnect for PostgreSQL (former Core Labs PostgreSQLDirect) Intersolv 3.11 ODBC Driver IBM DB2 for i .NET data provider ODBC Driver for Ingres Pervasive ODBC Client Interface SQLBase OLE DB Data Provider Teradata .Net driver OLE DB Provider for Teradata Teradata ODBC Driver DBMaker 4.3 OLE DB Provider DBMaker ODBC Driver NetezzaSQL ODBC Driver SQLite3 ODBC Driver FileMaker Pro ODBC Lotus Notes ODBC Driver UniOLEDB UniObjects for .NET Netezza OLE DB ComputerEase ODBC IBM UniVerse ODBC Driver DBMaker 5.2 OLE DB Provider .NET txtReader for Text Files