Why DataReader is Forward Only?

Answer Posted / sanchit yadav

Because it inherites the IEnumerable.IEnumarble contains
the method(getenumerator) its type is IEnumerator it
returns the instance of IEnumerator that implements in a
class that contains three methods current(),movenext(),
reset().Ist call the current() than movenext() move first
tuple to last tuple in the table than call reset() than
cursor moves on the current().So,DataReader works in
forward only and Read only manner.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does executenonquery () method return?

498


What are all the classes that are available in System.Data Namespace?

552


What is ado data control?

521


Which is better ole db or odbc?

496


How to perform sorting on a table in ADO.NET?

552






What are the main differences between classic ado and ado.net?

514


What is datasource in ado.net?

582


How do you find the count of records in a dataset?

476


Explain sqlconnection object?

530


What is linq and entity framework?

514


What are all the commands used with Data Adapter?

517


What is executequery?

493


Some important instruction regarding ADO.NET connection string ?

541


How to retrieve the user id which is provided while windows authentication?

586


What Is Difference Between Ado And Ado.net?

558