Answer Posted / shakeer
We don't require to create object of DataReader class.
Because , For Example
if any string value is there like "Hello"
we will capture that value into String Class varible.
String s = "Hello";
In the same way when we call ExecuteReader() method, the
return type is DataReader
METHOD RETURN TYPE
ExecuteReader() ----> Datareader
DataReader: Which is having the capacity of holding the data
in the form of Rows and Columns
when we need to capture the value of string type, we
created the variable of the String class & captured it.
Similarly in the case of Datareader, we will create variable
of Datareader and capture the return type of ExecuteReader()
method.
So, DataReader dr = cmd.ExecuteReader();
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain executenonquery?
Which one of the following objects is a high-level abstraction of the connection and command objects in ado.net?
Explain the advantage of ADO.Net?
Does ado.net use odbc?
What is two way data binding android?
What is oledb driver?
What is data relation?
What is ado.net connection?
What is ole2 format?
Which is better entity framework or ado.net?
Which is better ole db or odbc?
What is the return type of executescalar?
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?
Is it possible to edit data in Repeater control?
What is execute reader in ado.net?