Deck 25: The Missing Linq Querying a Database

Full screen (f)
exit full mode
Question
The following syntax selects all of the records in the dataset:
Dim records = From employee In EmployeesDataSet.tblEmploy
Select employee
Use Space or
up arrow
down arrow
to flip the card.
Question
If you are sorting records in ascending order, you need to include the keyword Ascending in the Order By clause.
Question
In a query, the Where and Order By clauses are optional parts of the syntax.
Question
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
Question
The syntax for LINQ requires you to specify the variable's data type.
Question
The Total operator returns the sum of the values in the group.
Question
A dataset is a copy of the fields and records the application can access from a database.
Question
The LINQ statement merely selects the records but does not assign them to the records variable.
Question
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
Question
The LINQ ____ operator returns a single value from a group of values.

A) collect
C) integrate
B) collapse
D) aggregate
Question
You use a(n) ____ to specify both the records to select in a dataset and the order in which to arrange the records.

A) query
C) inquiry
B) question
D) access
Question
The ____ operator returns the smallest value in the group.

A) Max
C) Min
B) Smallest
D) Minimum
Question
In a query, the ____ clause is used to limit the records you want to view.

A) Select
C) Where
B) From
D) Order
Question
You can create a query in Visual Basic 2010 using a language feature called ____.

A) Integrated Language Query
C) Structured Language
B) Language Query
D) Language Integrated Query
Question
A dataset is stored in the computer's internal memory while the application is running.
Question
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
Question
The only calculations that are performed using the LINQ aggregate methods are Average and Count.
Question
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
Question
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.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/19
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 25: The Missing Linq Querying a Database
1
The following syntax selects all of the records in the dataset:
Dim records = From employee In EmployeesDataSet.tblEmploy
Select employee
True
2
If you are sorting records in ascending order, you need to include the keyword Ascending in the Order By clause.
False
3
In a query, the Where and Order By clauses are optional parts of the syntax.
True
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
Unlock Deck
Unlock for access to all 19 flashcards in this deck.
Unlock Deck
k this deck
5
The syntax for LINQ requires you to specify the variable's data type.
Unlock Deck
Unlock for access to all 19 flashcards in this deck.
Unlock Deck
k this deck
6
The Total operator returns the sum of the values in the group.
Unlock Deck
Unlock for access to all 19 flashcards in this deck.
Unlock Deck
k this deck
7
A dataset is a copy of the fields and records the application can access from a database.
Unlock Deck
Unlock for access to all 19 flashcards in this deck.
Unlock Deck
k this deck
8
The LINQ statement merely selects the records but does not assign them to the records variable.
Unlock Deck
Unlock for access to all 19 flashcards in this deck.
Unlock Deck
k this deck
9
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
Unlock Deck
Unlock for access to all 19 flashcards in this deck.
Unlock Deck
k this deck
10
The LINQ ____ operator returns a single value from a group of values.

A) collect
C) integrate
B) collapse
D) aggregate
Unlock Deck
Unlock for access to all 19 flashcards in this deck.
Unlock Deck
k this deck
11
You use a(n) ____ to specify both the records to select in a dataset and the order in which to arrange the records.

A) query
C) inquiry
B) question
D) access
Unlock Deck
Unlock for access to all 19 flashcards in this deck.
Unlock Deck
k this deck
12
The ____ operator returns the smallest value in the group.

A) Max
C) Min
B) Smallest
D) Minimum
Unlock Deck
Unlock for access to all 19 flashcards in this deck.
Unlock Deck
k this deck
13
In a query, the ____ clause is used to limit the records you want to view.

A) Select
C) Where
B) From
D) Order
Unlock Deck
Unlock for access to all 19 flashcards in this deck.
Unlock Deck
k this deck
14
You can create a query in Visual Basic 2010 using a language feature called ____.

A) Integrated Language Query
C) Structured Language
B) Language Query
D) Language Integrated Query
Unlock Deck
Unlock for access to all 19 flashcards in this deck.
Unlock Deck
k this deck
15
A dataset is stored in the computer's internal memory while the application is running.
Unlock Deck
Unlock for access to all 19 flashcards in this deck.
Unlock Deck
k this deck
16
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
Unlock Deck
Unlock for access to all 19 flashcards in this deck.
Unlock Deck
k this deck
17
The only calculations that are performed using the LINQ aggregate methods are Average and Count.
Unlock Deck
Unlock for access to all 19 flashcards in this deck.
Unlock Deck
k this deck
18
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
Unlock Deck
Unlock for access to all 19 flashcards in this deck.
Unlock Deck
k this deck
19
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.
Unlock Deck
Unlock for access to all 19 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 19 flashcards in this deck.