4
Reply

What DataReader class do in ADO.NET ?

    1)Works on Connection Oriented Architecture. 2)Read-Only Access. 3) Only Foreword Directional.

    datareader is use to fatch the data from database , it always connected to database, its a connected architecture.

    Datareader is based on connected architecture and holds the records fetched using command object.

    To get read-only and forward only access to data we use DataReader .the DataReader object reduces the system overhead because one row at a time is taken into memory so it is quite lightweight. To get second object connection is reconnected. We can create a DataReader object by execute Execute readre() method. There are two Data Reader class one is SqlDataReader and other is OleDbDataReader.