To read records you must create a loop that contains a call to . I cannot tell you the number of times I forgot this when working with recordsets in classic ADO. In ADO, if we used a client-side Recordset, our data was disconnected from the data source.Data Reader directly access the table and it is only used for reading the records from it whereas dataadapter, used to maintain connection, is always used with dataset as dataset is of disconnected-architecture in nature.In Lesson 3, we discussed a fully connected mode of operation for interacting with a data source by using the Sql Command object.Like a Swiss army knife, it wasn’t the perfect tool for every job, but given the correct configuration, it could do whatever you needed it to do.
In the beginning, there was the recordset, a central feature of classic ADO.Its dark side included an amazing level of complexity and the number of special cases when it was used with particular providers. NET were befuddled by the lack of anything called a recordset.So while the recordset could do almost any task, most code did not use it correctly-in some cases using inappropriate default values, and in others explicitly setting parameters in ways that were not optimal for the application at hand. NET, then called ADO , I was a little concerned: Calling this new technology by the same name as what we now know as classic ADO would cause no end of confusion. They expected a 2.0 sort of upgrade to classic ADO. NET was a totally new set of components, and it was optimized for the Internet world. NET, you can use either a Data Reader or a Data Set. There are a number of data providers, such as Sql Client, included with ADO.In Lesson 4, we learned about how to read data quickly an let go of the connection with the Sql Data Reader.This Lesson shows how to accomplish something in-between Sql Connection and Sql Data Reader interaction by using the Data Set and Sql Data Adapter objects.So the Sql Data Adapter manage the communication between these two Objects.