when to use a dataset and when to use datareader

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • phanimadhav
    New Member
    • Jun 2007
    • 78

    when to use a dataset and when to use datareader

    Hello experts,
    I have small query in ado.net.When we are using Dataset and when we are using Datareader.Actu ally these two are using getting the values from database.But which situation we are using Dataset and when we are using Datareader.Coul d you please help me.Thank you for ur advanced reply
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    There are many prior posts re this subject, suggest you search the site.

    Depends on the requirements and how the data will be used.

    Comment

    • Frinavale
      Recognized Expert Expert
      • Oct 2006
      • 9749

      #3
      You can use the DataSet class to retrieve a collection of DataTable objects that you can relate to each other with DataRelation objects. After filling the DataSet with data, you can edit this data (delete rows or anything) in memory...withou t accessing the DataBase. You can then cancel what the user's done, or update the database with the changes if you want to.


      You can use the ADO.NET DataReader to retrieve a read-only data from a database.


      Make sense?


      -Frinny

      Comment

      Working...