MCSD.NET - 70-306 Exam Question:
Download Questions PDF

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.

Answer:

D. Call the SqlCommand.Prepare method before the first call to SqlCommand.ExecuteNonQuery.

Download MCSD.NET - 70-306 Exam Interview Questions And Answers PDF

Previous QuestionNext Question
Suppose You create a Visual Studio .NET setup project to distribute an application. You add a SQL script
named XYZDB.SQL. You must ensure that the SQL script is executed during the installation
process. What should you do?
A. Add a custom action to your setup project.
Select XYZDB.SQL as the source path.
B. Add a batch file to your setup project to execute XYZDB.SQL.
Add a launch condition to the setup project.
Set the Condition property to the batch file.
C. Create a new Visual Studio .NET project that executes XYZDB.SQL.
Include the new project with your setup project.
Add a custom action that launches the new project during installation.
D. Add a launch condition to your setup project.
Set the Condition property to XYZDB.SQL.
Tell me What is the difference between Remoting and Client/Server application?