Retrieving Data Using a DataReader
Retrieving data using a DataReader involves creating an instance of the Command object and then creating a DataReader by calling Command.ExecuteReader to retrieve rows from a data source. The following example illustrates using a DataReader where readerrepresents a valid DataReader and command represents…