Microsoft
70-516 · Question #253
70-516 Question #253: Real Exam Question with Answer & Explanation
Sign in or unlock 70-516 to reveal the answer and full explanation for question #253. The question stem and answer options stay visible for context.
Question
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application connects to a Microsoft SQL Server database. You create a DataSet object in the application. You add two DataTable objects named App_Products and App_Categories to the DataSet. You add the following code segment to populate the DataSet object. (Line numbers are included for reference only.) 01 Public Sub Filifcnx As SqlConnection, ds As DataSet) 02 Dim crod As var = cnx.CreateCorttnand() 03 cmd.CommandText = "SELECT * FROM dbo.Products;" + "SELECT * FROM dbo.Categories" 04 Dim adapter As var = New SqlDataAdapter(cmd) 05 06 End Sub You need to ensure that App_Products and App_Categories are populated from the dbo.Products and dbo.Categories database tables. Which code segment should you insert at line 05?
Options
- Aadapter.TableMappings.Add("Products", "App_Products")
- Badapter.Fill(ds, "Products")
- Cadapter.TableMappings.Add("Table", "App_Products")
- Dadapter.Fill(ds.Tables("App_Products"))
Unlock 70-516 to see the answer
You've previewed enough free 70-516 questions. Unlock 70-516 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.