Microsoft
70-516 · Question #201
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application. The application connects to a Microsoft SQL Server database. You load records from the Customers table…
The correct answer is A. DataTable dt = dataset.Tables["Customers"]. See the full explanation below for the reasoning.
Question
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application. The application connects to a Microsoft SQL Server database. You load records from the Customers table into a DataSet object named dataset. You need to retrieve the value of the City field from the first and last records in the Customers table. Which code segment should you use?
Options
- ADataTable dt = dataset.Tables["Customers"];
- BDataTable dt = dataset.Tables["Customers"];
- CDataRelation relationFirst = dataset.Relations[0];
- DDataRelation relationFirst = dataset.Relations[0];
How the community answered
(26 responses)- A81% (21)
- B4% (1)
- C4% (1)
- D12% (3)
Community Discussion
No community discussion yet for this question.