ANSWERS: 2
-
DataReader belongs is a disconnected architecture means we have to maintain connection when retreiving data. It is readonly forward only. It basically retrives data record by record against given command and connection.
-
use data reader to fetch records from the database. it fetches one record at a time. so, less memory usage. when you dont want to do any transactions on the fetched rows, data reader is the best choice. when you want to store the fetched data in the XML format, we can use data reader
Copyright 2023, Wired Ivy, LLC

by 