Chapter 3. ADO.NET Managed Providers

IN THIS CHAPTER

In the last chapter, you began looking at how an ASP.NET data-driven solution works. You looked at the ADO.NET object model, and how to build a DataSet dynamically. In this chapter, you'll dig into the two data access Managed Providers offered in ADO.NET: the SQL Managed Provider and the OleDB Managed Provider.

In this chapter, you'll learn the following:

  • How the .NET Managed Providers are a bridge from the application, such as an ASP.NET Web Form, to a data store, such as Microsoft SQL Server.

  • How to create Managed Connections to connect to a data store.

  • How to use Managed Commands to execute SQL statements on a database.

  • How to use DataAdapters to retrieve data and populate a DataSet.

  • How to create custom table and column mappings.

Managed Providers, as shown in Figure 3.1, are ADO.NET's bridge from an application, such as an ASP.NET Web Form to the data source. Data sources include Microsoft's SQL Server, Access, Oracle, or any other such data storage device.

Figure 3.1. Managed Providers are the bridge from a data store to a .NET application.


The Managed Providers have four core components:

  • Connection

    The Connection represents a unique session to a data store. This might be manifested as a network connection in a client/server database application.

  • Command

    The Command represents a SQL statement to be executed on a data store.

  • DataReader

    The DataReader is a forward-only, read-only stream of data records from a data store to a client.

  • DataAdapter

    The DataAdapter represents a set of Commands and a Connection which are used to retrieve data from a data store and fill a DataSet.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.144.229