What?s the role of the DataReader class in ADO.NET connections?
Answer Posted / ajay singh negi
DataReader object is a simply used to read data from the
result sets and because of this feature we call this object
as forward only or read only cursor. It requires a live
connection with the data source. Threw looping you can
efficiently access all or a part of data from the result
set. Note you cannot directly initialize a DataReader
object. Execute reader method of the command object is used
to obtain a valid DataReader object. After using DataReader
you need to close the connection otherwise it is stayed
alive and it is explicitly closed.
Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
What is oledb driver?
What is the role of data provider in ado.net?
What is the difference between typed and untyped dataset?
How to find the given query is optimised one or not?
What is the difference between executenonquery () and executescalar ()?
What is difference between sqldatareader and sqldataadapter?
What is data relation?
How to bind the controls(best practice) comboboxes to the data in the dataset?
What is the default Timeout for SqlCommand.CommandTimeout property?
Can we create Synonymns in MS Acess,My Sql Server,Sql Server? But iam we can create in oracle!
What is executenonquery ado.net?
What is ole word?
I loaded the dataset with a table of 10 records. One of the records is deleted from the backend, how do you check whether all the 10 records were present while updating the data(which event and steps) and throw the exception 28 can datareader hold data from multiple tables?
How many major types of connection objects in ADO.NET?
How does entity framework work?