Difference between sqlServerDataReader and DataSet

Source: Internet
Author: User
The differences between sqlServerDataReader and DataSet are compared in the following aspects: 1. connection to database: DataReader: connection-oriented, read-only, only forward read-only, disconnect after reading data; DataSet: Non-connection-oriented, load data into the SQL cache pool, then disconnect; 2. data processing speed: DataReader: fast;

The differences between sqlServer DataReader and DataSet are compared in the following aspects: 1. connection to database: DataReader: connection-oriented, read-only, only forward read-only, disconnect after reading data; DataSet: Non-connection-oriented, load data into the SQL cache pool, then disconnect; 2. data processing speed: DataReader: fast;

Difference between sqlServer DataReader and DataSet

Compare the following aspects:

1. Connect to the database:

DataReader: connection-oriented, read-only, read-only, only forward reading, disconnect after reading data;

DataSet: Non-connection-oriented. load data to the SQL cache pool and disconnect the database;

2. Data processing speed:

DataReader: fast;

DataSet: Slow speed;

3. update the database:

DataReader: After the update, it cannot be restored to the original database;

DataSet: After the update, it can be restored to the original database;

4. Supports sorting by page:

DataReader: Paging and sorting are not supported;

DataSet: supports paging and sorting, and reads the first few items (false pages) from the memory );

5. memory usage:

DataReader: memory usage is small;

DataSet: memory usage is high;

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.