.NET Framework Data Provider for ODBC

This .NET Framework Wrapper Class Library is provided by Microsoft.
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
' execute queries, etc

C# code sample
using System.Data.Odbc;
OdbcConnection myConnection = new OdbcConnection();
myConnection.ConnectionString = myConnectionString;
// execute queries, etc


In .NET framework version 1.0 the driver was contained in a separate download and accessed through the Microsoft.Data.ODBC namespace, since 1.1 it's in .Net framework and contained in the System.Data.Odbc 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 link missing
The .NET Framework Data Provider for ODBC installation package download link is missing. Please provide info and contribute to the community by email to
Connection Strings
The .NET Framework Data Provider for ODBC wrapper class library can be used to connect to the following data sources:

Access Access 2007 AS/400 (IBM iSeries) Caché Composite Information Server ComputerEase DBF / FoxPro DBMaker DSN Excel Excel 2007 Filemaker Firebird IBM DB2 Informix Ingres Interbase Intuit QuickBase Lotus Notes Mimer SQL MySQL Netezza DBMS Oracle Paradox Pervasive Postgre SQL Progress SQL Azure SQL Server 2000, 7.0 SQL Server 2005 SQL Server 2008 SQL Server 2012 SQLBase SQLite Sybase Adaptive Sybase Advantage Teradata Textfile UniVerse Valentina Visual FoxPro / FoxPro 2.x ZIM
To see available connection options, navigate connection strings reference by the above data source links.
Additional info or comments on this wrapper class library? Want to submit content?


Copyright © 2013 30c.org   |   All Rights Reserved   |   Powered by CSAS   |   Send feedback, articles, requests and more connection strings here.