2
Reply

What is the difference between a DataReader and a DataSet?

Sapna Malik

Sapna Malik

15y
4.6k
0
Reply

    Hi Sapna,

    It is very much asked question so far.
    There are lots of differences and you can choose any of them according to your use.
    The difference given above by friend is one point.
    Now See..
    DataSet : - 
    It means set of data (Tables) --->
    So it takes time to fill whole data.And you cannot access data before fully filled.
    It uses "DataReader" internally to fill the datas.
    Consist set of queries so Lot Memory and less performance.
    So sometime bad while loading or using in ASP.Net pages.
    Best while passing whole datas to any services.
    ----------------------------------------
    DataReader
    You can print datas while reading each lines from database.
    Stores one result at a time.
    Faster less memory.
    ====================================
    http://yuvadeveloper.blogspot.com

    DataReader(connection oriented) is a read only and forward
    only record set which will have the data retrieved based on
    the select statement.we can't do DML operations through
    datareader.

    whereas DataSet(disconnected) model which we can do all the
    DML operations.

    Shouketh E K