Ado. NET DataSet and ADO recordset comparison

Source: Internet
Author: User
Ado| Comparison guide: In ADO Our most commonly used objects on the recordset, and in the Ado.net added an object dataset. This article briefly compares the similarities and differences of Dateset and Recordset, which is very helpful to ado.net beginners.
--------------------------------------------------------------------------------
Translation finishing:. NET technology Network (www.51dotnet.com) Gao Fei
Original source: http://www.database-applications.net/articles/dotnet4.html

A Recordset is a collection of records that is connected or disconnected (by using cursors) and is defined as a datasheet. A dataset is a broken collection of records that can be used as a dataset in memory.

The recordset and the provider of the data are concerned: Some data providers do not support the methods and attributes of some recordsets. Instead, different methods of the dataset, such as queries, sorting, filtering, and updating, are independent of the data provider.

When the new version of ADO allows the recordset to be saved or converted to XML so that data can be passed into the application and across the firewall, the dataset does the same task without conversion, because the dataset is declared in XML.

The recordset is untyped, meaning that it stores each data as a Variant variable. However, the dataset is strongly typed and stores the data according to its original type. Strong typing means more standardized programming and fewer errors.

Updating the database through the ADO recordset is tedious, inefficient, and inefficient. For example, if there are 50 records to be updated, and a record cannot be updated, the database rejects the entire recordset. This problem does not exist in the dataset because the dataset can catch errors on one line by its RowError attribute. In addition to data, datasets can also be added or modified for their relationships, columns, tables, and similar objects, and do not require multiple database connections.

Finally, in a recordset, the data is usually retrieved using a circular method. In a dataset, data views are created and bound to server controls, so you can represent data without the need for mixed representations and data access code. This is a very concise way of programming.

In short, the dataset and the recordset are completely different. The dataset can be understood as an upgraded recordset. In the absence of performance tests and comparisons of the Ado.net dataset and ADO recordset, the dataset should be more efficient.


Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.