Microsoft
70-516 · Question #6
70-516 Question #6: Real Exam Question with Answer & Explanation
The correct answer is B. from row in ds.Tables[0].AsEnumerable(). Field<T>(DataRow, String) Provides strongly-typed access to each of the column values in the The Field method also supports nullable types.
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 use the following SQL statement to retrieve an instance of a DataSet object named ds: SELECT CustomerID, CompanyName, ContactName, Address, City FROM dbo.Customers You need to query the DataSet object to retrieve only the rows where the ContactName field is not NULL. Which code segment should you use?
Options
- Afrom row in ds.Tables[0].AsEnumerable()
- Bfrom row in ds.Tables[0].AsEnumerable()
- Cfrom row in ds.Tables[0].AsEnumerable()
- Dfrom row in ds.Tables[0].AsEnumerable()
Explanation
Field<T>(DataRow, String) Provides strongly-typed access to each of the column values in the The Field method also supports nullable types.
Community Discussion
No community discussion yet for this question.