Chapter 25 If you are sorting records in ascending order, you need

subject Type Homework Help
subject Pages 3
subject Words 489
subject Authors Diane Zak

Unlock document.

This document is partially blurred.
Unlock all pages and 1 million more documents.
Get Access
page-pf1
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.
page-pf2
a.
query
c.
inquiry
b.
question
d.
access
2. You can create a query in Visual Basic 2012 using a language feature called ____.
a.
Integrated Language Query
c.
Structured Language
b.
Language Query
d.
Language Integrated Query
3. In a query, the ____ clause is used to specify the records you want to select in the dataset.
a.
Select
c.
Where
b.
From
d.
Order
4. Similar to the condition in If…Then…Else and Do…Loop statements, the ____ clause specifies a
requirement that must be met for a record to be selected.
a.
Select
c.
From
b.
Where
d.
Order By
5. In a query, the ____ clause is used to sort the records in either ascending (the default) or descending
order by one or more fields.
a.
Order By
c.
From
b.
Select
d.
Where
6. The basic syntax to use the LINQ to select and arrange records in a data set is ____.
a.
Dim variableName = In dataset.table From elementName
b.
Dim variableName = From elementName In dataset.table
c.
Dim In dataset.table From elementName = variableName
d.
Dim From elementName In dataset.table = variableName
7. The basic syntax for assigning a LINQ variable’s contents to a BindingSource object is ____.
a.
DataSource.bindingSource = AsDataView.variableName
b.
DataSource.bindingSource = variableName.AsDataView
c.
bindingSource.DataSource = AsDataView.variableName
d.
bindingSource.DataSource = variableName.AsDataView
8. The LINQ ____ operator returns a single value from a group of values.
a.
collect
c.
integrate
b.
collapse
d.
aggregate
9. The ____ operator returns the total of the values in the group.
a.
Total
c.
Calc
b.
Sum
d.
Add
page-pf3
10. The ____ operator returns the smallest value in the group.
a.
Max
c.
Min
b.
Smallest
d.
Minimum

Trusted by Thousands of
Students

Here are what students say about us.

Copyright ©2022 All rights reserved. | CoursePaper is not sponsored or endorsed by any college or university.