Using .NET Framework Data Providers to Access Data

A data provider in the .NET Framework serves as a bridge between an application and a data source. A data provider is used to retrieve data from a data source and to reconcile changes to that data back to the data source.

The following table lists the .NET Framework data providers that are included in the .NET Framework.

.NET Framework data provider Description
.NET Framework Data Provider for SQL Server For Microsoft® SQL Server™ version 7.0 or later.
.NET Framework Data Provider for OLE DB For data sources exposed using OLE DB.
.NET Framework Data Provider for ODBC For data sources exposed using ODBC.

Note   The .NET Framework Data Provider for ODBC is not included in the .NET Framework version 1.0. If you require the .NET Framework Data Provider for ODBC and are using the .NET Framework version 1.0, you can download the .NET Framework Data Provider for ODBC at https://msdn.microsoft.com/downloads. The namespace for the downloaded .NET Framework Data Provider for ODBC is Microsoft.Data.Odbc.

.NET Framework Data Provider for Oracle For Oracle data sources. The .NET Framework Data Provider for Oracle supports Oracle client software version 8.1.7 and later.

Note   The .NET Framework Data Provider for Oracle is not included in the .NET Framework version 1.0. If you require the .NET Framework Data Provider for Oracle and are using the .NET Framework version 1.0, you can download the .NET Framework Data Provider for Oracle at https://msdn.microsoft.com/downloads.

The Connection, Command, DataReader, and DataAdapter objects represent the core elements of the .NET Framework data provider model. The following table describes these objects.

Object Description
Connection Establishes a connection to a specific data source.
Command Executes a command against a data source.
DataReader Reads a forward-only, read-only stream of data from a data source.
DataAdapter Populates a DataSet and resolves updates with the data source.

Along with the core classes listed in the preceding table, a .NET Framework data provider also contains the classes listed in the following table.

Object Description
Transaction Enables you to enlist commands in transactions at the data source.
CommandBuilder A helper object that will automatically generate command properties of a DataAdapter or will derive parameter information from a stored procedure and populate the Parameters collection of a Command object.
Parameter Defines input, output, and return value parameters for commands and stored procedures.
Exception Returned when an error is encountered at the data source. For an error encountered at the client, .NET Framework data providers throw a .NET Framework exception.
Error Exposes the information from a warning or error returned by a data source.
ClientPermission Provided for .NET Framework data provider code access security attributes.

In This Section