Suppose You develop a Windows-based inventory management application that interacts with a Microsoft
SQL Server database. Your application enables users to update information about items in
inventory. Each time a user changes an inventory item, your application executes a SQL Server
stored procedure XYZSP to update rows in the database. XYZSP will run many times during each
user session.
Your application will use a SqlCommand object to execute XYZSP. You must revise your code so
that the use of this object optimizes query performance.
What should you do?
A. Call the SqlCommand.DeriveParameters method before each call to
SqlCommand.ExecuteNonQuery.
B. Call the SqlCommand.Prepare method before each call to SqlCommand.ExecuteNonQuery.
C. Call the SqlCommand.DeriveParameters method before the first call to
SqlCommand.ExecuteNonQuery.
D. Call the SqlCommand.Prepare method before the first call to SqlCommand.ExecuteNonQuery.

Submitted by: Administrator
D. Call the SqlCommand.Prepare method before the first call to SqlCommand.ExecuteNonQuery.
Submitted by: Administrator

Read Online MCSD.NET - 70-306 Exam Job Interview Questions And Answers