nerdexam
Microsoft

70-516 · Question #173

You use Microsoft .NET Framework 4.0 to develop an application that connects to a Microsoft SQL Server 2008 database. You add the following stored procedure to the database. CREATE PROCEDURE…

The correct answer is B. DataSet ds = new DataSet(). See the full explanation below for the reasoning.

Question

You use Microsoft .NET Framework 4.0 to develop an application that connects to a Microsoft SQL Server 2008 database. You add the following stored procedure to the database. CREATE PROCEDURE dbo.GetClassAndStudents AS BEGIN SELECT * FROM dbo.Class SELECT * FROM dbo.Student END You create a SqIConnection named conn that connects to the database. You need to fill a DataSet from the result that is returned by the stored procedure. The first result set must be added to a DataTable named Class, and the second result set must be added to a DataTable named Student. Which code segment should you use?

Options

  • ADataSet ds = new DataSet();
  • BDataSet ds = new DataSet();
  • CDataSet ds = new DataSet();
  • DDataSet ds = new DataSet();

How the community answered

(26 responses)
  • A
    8% (2)
  • B
    77% (20)
  • C
    4% (1)
  • D
    12% (3)

Community Discussion

No community discussion yet for this question.

Full 70-516 Practice