bharat patel
Explain the difference between data reader and data adapter in ADO.NET?
By bharat patel in ADO.NET on Jul 02 2012
  • Rahul Prajapat
    May, 2015 27

    DataReader is used to read the data from database and it is a read and forward only connection oriented architecture during fetch the data from database. DataReader will fetch the data very fast when compared with dataset. Generally we will use ExecuteReader object to bind data to datareader. *.Holds the connection open until you are finished (don't forget to close it!). *.Can typically only be iterated over once *.Is not as useful for updating back to the database. DataAdapter will acts as a Bridge between DataSet and database. This dataadapter object is used to read the data from database and bind that data to dataset. Dataadapter is a disconnected oriented architecture. *. Lets you close the connection as soon it's done loading data, and may even close it for you automatically *.All of the results are available in memory *.You can iterate over it as many times as you need, or even look up a specific record by index *.Has some built-in faculties for updating back to the database.

    • 1


Most Popular Job Functions


MOST LIKED QUESTIONS