PrepAway - Latest Free Exam Questions & Answers

Which myCommand method should you use?

Your Microsoft SQL Server database has a stored procedure that sums the total number of orders received each day. The stored procedure returns a result that is a single data value of type integer. You need to write code that will execute the stored procedure and return the result as an integer value. You instantiate a SqlCommand object named myCommand and initialize all appropriate parameters. Which myCommand method should you use?

PrepAway - Latest Free Exam Questions & Answers

A.
ExecuteReader

B.
ExecuteNonQuery

C.
ExecuteScalar

D.
ExecuteXMLReader


Leave a Reply