nerdexam
GIAC

GSSP-.NET · Question #393

GSSP-.NET Question #393: Real Exam Question with Answer & Explanation

Sign in or unlock GSSP-.NET to reveal the answer and full explanation for question #393. The question stem and answer options stay visible for context.

Question

  • (Topic 3) named MyApp1, using Visual Studio .NET. MyApp1 uses a Microsoft SQL Server 2000 database, named Database1. Database1 contains a table, named Orders, that stores the order details. In Database1, he creates a stored procedure, named Proc1, as follows: CREATE PROCEDURE [Proc1] AS Return (Select Count(*) from Orders) The Proc1 stored procedure returns a count of the number of rows in the Orders table. MyApp1 includes a page, named Page1.aspx. In the Page1_Load event handler, John writes the following code to call the stored procedure: string Str1; SqlConnection Con; SqlCommand Cmd1; Str1 = "Server=TestPro1;Database=Database1;uid=sa;pwd=;"; Con = new SqlConnection(Str1); Cmd1 = new SqlCommand("Proc1", Con); Cmd1.CommandType = CommandType.StoredProcedure; John wants to create an instance of the SqlParameter class that represents the return value from the Proc1 stored procedure. Which of the following code will he use to accomplish the task?

Options

  • ASqlParameter Parm1;
  • BSqlParameter Parm1;
  • CSqlParameter Parm1;
  • DSqlParameter Parm1;

Unlock GSSP-.NET to see the answer

You've previewed enough free GSSP-.NET questions. Unlock GSSP-.NET for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Full GSSP-.NET Practice