Ado|asp.net| Create and use Ado.net in asp.net (ii)
Second, the Ado.net components
The purpose of designing ado.net components is to decompose data access from data operations. The two core components of Ado.net accomplish this task: a DataSet and a. NET Framework data provider, which is a set of components, including Connection, Command, DataReader, and DataAdapter objects.
The Ado.net DataSet is the core component of a ado.net disconnected structure. The dataset is designed to be clear: to achieve data access independent of any data source. Therefore, it can be used for a variety of different data sources, for XML data, or for managing application-local data. A DataSet contains a collection of one or more DataTable objects that consist of data rows and columns of data, as well as relational information about the data in the primary key, foreign keys, constraints, and the DataTable object.
Another core element of the ado.net structure is the. NET Framework data provider, whose components are designed to be fairly clear: for data manipulation and fast, forward-only, read-only access to data. The Connection object provides a connection to the data source. The command object gives you access to database commands for returning data, modifying data, running stored procedures, and sending or retrieving parameter information. DataReader delivers high-performance data streams from the data source. Finally, DataAdapter provides a bridge to connect dataset objects and data sources. DataAdapter uses the command object to execute SQL commands in the data source to load data into the dataset and to keep changes to the data in the dataset consistent with the data source.
You can write. NET Framework data providers for any data source. The. NET Framework provides four. NET Framework data providers: SQL Server. NET Framework Data provider, OLE DB. NET F Ramework data providers, ODBC. NET Framework data providers, and Oracle. NET Framework data providers.
The following figure illustrates the components of the ado.net structure.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service