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;