Define Execute Reader?
Pankaj Pathak
Execute Reader is ADO.Net command and it works forward only and read only. this fetch the record one by one from database
ExecuteReader is used for any result set with multiple rows/columns (e.g., SELECT col1, col2 from sometable).
the execute reader get single data one by one from database
Execute Reader is ADO.Net command and it works forward only and read only. this fetch the record one by one from database the biggest drawbacks is it is not move backward direction so it is not updated a data.it is using for read a data from database
Fetches single record at a time from database.
ExecuteReader is a predefined member method of Command Class which is used in ConnectionOriented Architecuter. Return type of the ExecuteReader() is DataReader used to execute the commands
ExecuteReader is a command method used with connection oriented. This command method needs open dadabase connection. It works in forward only mode. If we want to retrieve more records then we will use datareader.
The ExecuteReader() in C# SqlCommand Object sends the SQL statements to the Connection Object and populate a SqlDataReader Object based on the SQL statement.
Execute Reader is an Connected ADO.NET object used to fetch single record at a time
In ADO.net Execute Reader its for fetch record on by one , Reader always work forward, and for reader connection must require , cant work in disconnected mode.