This article has been excerpted from the book "A Programmer's Guide to ADO.NET in C#".
In this article, you'll examine ADO.NET data provider-specific classes.
First of all, what are the ADO.NET data providers? Technically, an ADO.NET data provider is a set of classes that enables you to connect to a data source to read and write data from a data source. A data provider also has components that serve as a conduit between the data source and the DataSet. In this way, the architecture isolates the manipulation of data from the source of the data. Currently, providers utilize the APIs of three main technologies that support database connectivity: the OLE-DB API, the ODBC API, and SQL server API.
ADO.NET has a number of data providers. Some of them are the OleDb data provider for manipulating databases supporting OleDb connectivity, the Sql data provider for connecting to SQL server 7 or later databases, and the ODBC data provider to connect to any ODBC data sources.
Figure 5-20 shows a generic class model of a data provider. The same component model applies to all of the Data providers. All data providers implement the same class model, so once you're comfortable with one data provider, you can easily manipulate other data providers in no time. It's just a matter of changing class names and the connection string.
You'll begin your understanding of the ADO.NET data provides by examining the different data provider namespaces contained in ADO.NET. The namespaces contain the classes necessary to manipulate the data providers.
As you've seen in the ADO.NET class hierarchy section of this article, ADO.NET implements n number of data providers. Some of them are OleDb, SQL, and ODBC.
The System.Data.OleDb namespace defines classes that work with OLEDB data sources. These data providers use the native OLEDB API to connect with OLEDB data sources, such as Jet databases, XML files, and Microsoft Access databases. To work with a specific data source, you must have an OLEDB provider for that data source. Table 5-15 describes most of the OleDb data provider classes. I'll use these classes throughout this article.
Table 5-15. OleDb Data Provider Classes

Figure 5-20. A generic data provider

Join the conversation! Your thoughts help the community grow.