Chapter 25: The Missing “LINQ” (Querying a Database)
TRUE/FALSE
1. A dataset is a copy of the fields and records the application can access from a database.
2. A dataset is stored in the computer’s internal memory while the application is running.
3. The syntax for LINQ requires you to specify the variable’s data type.
4. In a query, the Where and Order By clauses are optional parts of the syntax.
5. The following syntax selects all of the records in the dataset:
Dim records = From employee In EmployeesDataSet.tblEmploy
Select employee
6. If you are sorting records in ascending order, you need to include the keyword Ascending in the Order
By clause.
7. The LINQ statement merely selects the records but does not assign them to the records variable.
8. In addition to using LINQ to sort and select the records in a dataset, you also can use it to perform
arithmetic calculations on the fields in the records.
9. The only calculations that are performed using the LINQ aggregate methods are Average and Count.
10. The Total operator returns the sum of the values in the group.
MULTIPLE CHOICE
1. You use a(n) ____ to specify both the records to select in a dataset and the order in which to arrange
the records.