ADO.NET Data Providers

Introduction

In this blog, we will learn about  ADO.NET Data Providers. 

ADO.NET Data Providers

The classes responsible for the movement of data between the disconnected data classes in the client application and the data store are referred to as connected classes or provider classes.

The ADO.NET Framework comes with the following providers

  • OLEDB: The OLEDB provider, is expressed through the System.Data.OleDb namespace. You can use this provider to access SQL Server 6.5 and earlier, SyBase, DB2/400, and Microsoft Access.
     
  • ODBC: The ODBC provider, expressed through the System.Data.Odbc namespace. This provider is typically used when no newer provider is available.
     
  • SQL Server: The Microsoft SQL Server provider, expressed through the System.Data.SqlClient namespace. It Contains classes that provide functionality similar to the generic OleDb provider. The difference is that these classes are tuned for SQL Server 7 and later data access.

Prior to .NET Framework 4, Microsoft also included a functional Oracle provider with the .NET Framework. However, its classes have been marked as deprecated and obsolete in .NET Framework 4.

Core objects that makeup a .NET Framework data provider

  • Connection: Establishes a connection to a specific data source. The base class for all Connection objects is the DbConnection class.
     
  • Command: Executes a command against a data source. Exposes Parameters and can execute in the scope of a Transaction from a Connection. The base class for all Command objects is the DbCommand class.
     
  • DataReader: Reads a forward-only, read-only stream of data from a data source. The base class for all DataReader objects is the DbDataReader class.
     
  • DataAdapter: Populates a DataSet and resolves updates with the data source. The base class for all DataAdapter objects is the DbDataAdapter class.

In addition to the core classes, the .NET Framework data provider also contains the classes Transaction, CommandBuilder, ConnectionStringBuilder, Parameter, Exception, Error, and ClientPermission.

Conclusion

In this blog, we learned about  ADO.NET Data Providers.