The .NET Framework includes an extensive set of data access tools that makes it easier to allow users to interact with databases in Web Forms pages.
As previously mentioned, there are essentially three groups of tools you will work with most often, when building data-driven applications in ASP.NET:
In addition, the Web Forms framework implements a simple yet flexible data-binding model that enables different sources of data to be bound to Web Forms controls.
NOTE: The discussions in this section focus mainly on the .NET Data Providers. Web Forms controls and the ASP.NET data binding model are covered in ASP.NET Web Forms. ASP.NET Data Source controls are covered in the next section.
A .NET data provider describes a set of libraries, specifically a collection of classes, used to manage communication between an application and a specific data source, such as a relational database or a hierarchical XML file.
The following table lists the data providers that are included in the .NET Framework.
Provider |
Description |
.NET Framework Data Provider for SQL Server™ |
Provides data access for Microsoft SQL Server™. Uses the System.Data.SqlClient namespace. |
NET Framework Data Provider for OLE DB |
For data sources exposed via OLE DB. Uses the System.Data.OleDb namespace. |
.NET Framework Data Provider for ODBC |
For data sources exposed via ODBC. Uses the System.Data.Odbc namespace. |
.NET Framework Data Provider for Oracle |
For Oracle data sources. Uses the System.Data.OracleClient namespace. |
For our purposes in this workshop, though, the discussions and samples focus only on the SQL and OLE DB data providers, since these are the readily available databases that this author has for tutorial and demo purposes.
However, the concepts described hereinafter apply to all data providers as well.
The SQL Server™ .NET Data Provider is designed to work with Microsoft SQL Server™ ( version 7.0 and later ) databases.
It uses the private protocol called Tabular Data Stream ( TDS ) to mediate communications directly between the server database and the representation of that data in the client application, without adding an OLE DB or Open Database Connectivity ( ODBC ) layer.
The OLE DB .NET Data Provider is designed to work with, among others, Microsoft.ACE.OLEDB.12.0, the OLE DB Provider for Microsoft Jet ( MSAccess databases ).
In brief, each .NET data provider serves as a bridge between your application and a specific data store, and are used to connect to a database, execute commands to retrieve data, and if needed, to reconcile changes to that data back to the data source.
The .NET data providers are designed to be lightweight, creating a minimal layer between the page and the data store, increasing performance without sacrificing functionality.