How do you execute multiple SQL statements using a DataReader?

Options
- Call the ExecuteReader method of two Command objects and assign the results to the same instance of a DataReader.
- Call the ExecuteReader method of a single Command object twice.
- Set the Command.CommandText property to multiple SQL statements delimited by a semicolon.
- Set the Command.CommandType property to multiple result sets.


CORRECT ANSWER : Set the Command.CommandText property to multiple SQL statements delimited by a semicolon.

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement