nerdexam
Microsoft

70-516 · Question #247

You use Microsoft .NET Framework 4 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 A. Dim ds As DataSet = New DataSet(). Table Mapping in ADO.NET

Implementing Data Access

Question

You use Microsoft .NET Framework 4 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.GetClossAndStudents AS BEGIN SELECT * FROM ctoo.Class SELECT * FROM dbo.Student END You create a SqlConnection 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

  • ADim ds As DataSet = New DataSet()
  • BDim ds As DataSet = New DataSet()
  • CDim ds As DataSet = New DataSet()
  • DDim ds As DataSet = New DataSet()

How the community answered

(24 responses)
  • A
    75% (18)
  • B
    4% (1)
  • C
    8% (2)
  • D
    13% (3)

Explanation

Table Mapping in ADO.NET

Topics

#SqlDataAdapter#multiple result sets#TableMappings#DataSet

Community Discussion

No community discussion yet for this question.

Full 70-516 Practice