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();
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.
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)
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