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
What is defaultview in datatable?
Define the data provider classes that is supported by ado.net?
What are the different layers of ado.net?
What is row state?
What are the main differences between classic ado and ado.net?
The answers which posted above is not satisfied my requirement? Can some one post teh exact answer? Thanx
What is the role of clr?
how can implement dropdownlist in particular of dataset when try to update?
What is connected architecture in ado.net?
What is connection string?
What are the essential features of ado.net?
What is openquery?
What is ado.net objects?
What is the difference between Datareader and Dataset?
What property must be set and what method must be called in your code to bind the data from some data source to the Repeater control?