mathieu_cupryk
asked on
What does an executereader return?
What does an executereader return?
A DataReader
ASKER
...a single value.
-------------------------- ---------- ---------- ---------- ---------- ---------- ----
...an XML DataSet.
-------------------------- ---------- ---------- ---------- ---------- ---------- ----
...a rowset.
-------------------------- ---------- ---------- ---------- ---------- ---------- ----
...nothing as there is no value to return.
--------------------------
...an XML DataSet.
--------------------------
...a rowset.
--------------------------
...nothing as there is no value to return.
ASKER
which of the four?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
It returns a class derived from DataReader depending on the type of the Command, i.e. an OdbcCommand.ExecuteReader( ) returns an OdbcDataReader.
The best answer is probably a rowset.
The best answer is probably a rowset.
It's kind of a pointless question, though, even for an "Intro to C#" course. All you need to do is memorize the right keywords, and you pass... but... that doesn't actually teach you anything. If they asked, "how many rows is the DataReader guaranteed to contain", or "which row is the DataReader's internal pointer pointing to immediately after the method returns", that would at least be something. But even then, who cares ? All that info is in the API comments, it doesn't take too long to look it up.
Sorry, I know that was offtopic, I just find CS classes like this one really frustrating :-(
Sorry, I know that was offtopic, I just find CS classes like this one really frustrating :-(