Deck 13: Working With Access Databases and Linq

Full screen (f)
exit full mode
Question
Before an application can access the data stored in a database,you need to connect the application to the database.
Use Space or
up arrow
down arrow
to flip the card.
Question
A ____ is a copy of the data (database fields and records)that can be accessed by an application.

A) position property
B) child table
C) dataset
D) bound control
Question
A(n)____ stores information in tables composed of columns and rows,similar to the format used in a spreadsheet.

A) relational database
B) object
C) bound control
D) dataset
Question
When you drag an object from a dataset to an empty area on the form,the computer creates a control and automatically binds the object to it.
Question
A relational database can contain one or more tables.
Question
Each column in a table represents a record and each row represents a field.
Question
The field used to link a child table to a parent table is known as the ____ in the child table.

A) record
B) foreign key
C) cell
D) primary key
Question
A group of related records is called a ____.

A) table
B) field
C) datagrid
D) primary key
Question
Connecting an object to a control is called ____.

A) linking
B) Order By clause
C) LINQ
D) binding
Question
In most tables,one of the fields uniquely identifies each record and is called the ____.

A) exception
B) foreign key
C) primary key
D) cell
Question
The computer can retrieve data stored in a relational format both quickly and easily,but the data must be displayed in a specific order.
Question
A(n)____ is a group of related fields that contain all of the necessary data about a specific person,place,or thing.

A) object
B) dataset
C) record
D) exception
Question
A(n)____ is an electronic file that contains an organized collection of related information.

A) field
B) computer database
C) dataset
D) exception
Question
A BindingNavigator control displays table data in a row and column format,similar to a spreadsheet.
Question
If you do not take deliberate steps in your code to handle exceptions,Visual Basic "handles" them for you.
Question
Databases created using Microsoft Access are relational databases.
Question
A database file contained in a project is referred to as a logic database file.
Question
The controls connected to an object in a dataset are known as ____.

A) bound controls
B) navigator controls
C) tables
D) fields
Question
When you drag an object from the Data Sources window to an existing control,the computer does not create a new control;rather,it merely binds the object to the existing control.
Question
A ____ is a single item of information about a person,place,or thing-such as a name,a salary amount,a Social Security number,or a price.

A) table
B) record
C) dataset
D) field
Question
The tblItems table contains a numeric field named Price.Which of the following statements finds the lowest price for an item and assigns the result to the dblLowPrice variable? The tblItems table contains a numeric field named Price.Which of the following statements finds the lowest price for an item and assigns the result to the dblLowPrice variable?  <div style=padding-top: 35px>
Question
To create a DataGridView control on the form,you would click on the ____ object in the Data Sources window and drag it to the form.

A) CustomerNum
B) InvoiceNum
C) CustomerDataSet
D) tblCustomer
Question
The BindingSource object stores the position of the record pointer in its ____ property.

A) View
B) Position
C) Navigation
D) Cell
Question
Which of the following statements selects all of the records in the tblStudents table? Which of the following statements selects all of the records in the tblStudents table?  <div style=padding-top: 35px>
Question
The intersection of a row and a column in a DataGridView control is called a ____.

A) cell
B) table
C) record
D) key
Question
The way Visual Basic saves changes to a local database file is determined by the file's ____ property.

A) BindingNavigator
B) Position
C) BindingSource
D) Copy to Output Directory
Question
You are responsible for connecting the Access database that contains the tblCustomer table to an application.You must first use the Data Source Configuration Wizard to ____.

A) test to see if the database is connected to the application
B) add a new data source
C) preview the contents of the dataset
D) bind the controls to the dataset
Question
You can use a(n)____ to specify both the records to select in a dataset and the order in which to arrange the records.

A) condition
B) parameter
C) query
D) aggregate operator
Question
When an application is running,you can use the ____ control to move from one record to the next in the dataset,as well as to add or delete a record and save any changes made to the dataset.

A) DataSet
B) BindingNavigator
C) TableAdapter
D) BindingSource
Question
If a user is not allowed to add a record,you should deselect the ____ check box within the task list for the DataGridView control.

A) Enable Adding
B) Enable Deleting
C) Edit Items
D) BindingNavigatorAddNewItem
Question
The ____ object can be used to save to the database any changes made to the data contained in the DataSet.

A) TableAdapter
B) TblEmployBindingSource
C) BindingSource
D) DataGridView
Question
A label,text box,or button can be added to the BindingNavigator control by accessing the control's task box and clicking ____.

A) AddNewItem
B) Properties
C) Insert Standard Items
D) Edit Items
Question
You can create a query in Visual Basic 2012 using a language feature called ____.

A) ASP
B) SQL
C) Java
D) Language Integrated Query
Question
The ____ object provides the connection between the DataSet and the bound controls on the form.

A) TableAdapter
B) DataGridView
C) BindingSource
D) BindingNavigator
Question
The ____ clause of LINQ is used to arrange the records in either ascending (the default)or descending order by one or more fields.

A) Order By
B) condition
C) query
D) Where
Question
The ____ statement is used for exception handling in a procedure.

A) Try...Catch
B) LINQ
C) Order By
D) aggregate
Question
An error that occurs while an application is running is called a(n)____.

A) logic error
B) runtime error
C) exception
D) message
Question
The BindingSource object's ____ methods move the record pointer to the first,last,next,or previous record in the dataset.

A) Position
B) View
C) Move
D) Navigation
Question
The ____ object is responsible for retrieving the appropriate information from the database and storing it in the DataSet.

A) TableAdapter
B) TblEmployBindingSource
C) BindingSource
D) DataGridView
Question
The ____ property (of the DataGridView)allows you to format a column's data,as well as change the column's width and alignment.

A) AutoSizeColumnsMode
B) DefaultCellStyle
C) BindingNavigator
D) DataGridView
Question
Which of the following statements will select all invoices of $200.00 or more and arrange the invoices in ascending order by Customer number? Which of the following statements will select all invoices of $200.00 or more and arrange the invoices in ascending order by Customer number?  <div style=padding-top: 35px>
Question
Write the statements to move the record pointer to the first and last records in the dataset for the Customer table.
Question
Write the code needed to include a Try...Catch statement that will handle an error that might occur while saving in an application.Use the following statements in the Try block,along with a message for the user of the Student Data Application that notifies the user the changes have been saved.Provide an error message if an exception occurs.
Write the code needed to include a Try...Catch statement that will handle an error that might occur while saving in an application.Use the following statements in the Try block,along with a message for the user of the Student Data Application that notifies the user the changes have been saved.Provide an error message if an exception occurs.  <div style=padding-top: 35px>
Question
Write a LINQ statement to select all records.
Question
Write a LINQ statement to select the records in descending order by the Quantity field.
Question
Write a LINQ statement to select all bicycles with a price greater than $450.Arrange the bicycles in descending order by price.
Question
Write a LINQ statement to select all blue bicycles.Order the bicycles in ascending order by quantity.
Question
What are the advantages to storing data in a relational database?
Question
Write the statement needed to assign the contents of the records variable to the BindingSource object for the tblBicycle table.Explain why this should be done in an application.
Question
Which of the following statements will calculate a total for all of the unpaid invoices? Which of the following statements will calculate a total for all of the unpaid invoices?  <div style=padding-top: 35px>
Question
What is the DataGridView control and how is it used?
Question
Define the terms "record," "field," and "table." Provide examples of each term when you are defining them.
Question
Write the statements to move the record pointer to the previous and next records in the dataset for the Vehicle table.
Question
Write a LINQ statement to calculate the total value of the inventory.
Question
Relational databases contain multiple tables that relate to each other in some way.How are primary and foreign keys used in such a database?
Question
You need to make sure the user of the application can add records but cannot delete any records.Which of the following needs to be performed?

A) Remove the Add new button from the TblCustomerBindingNavigator control.
B) Remove the Delete button from the TblCustomerBindingNavigator control.
C) Remove the Save button from the TblCustomerBindingNavigator control.
D) b and c
Question
Write the code to calculate the average price of all of the bicycles in inventory.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/57
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 13: Working With Access Databases and Linq
1
Before an application can access the data stored in a database,you need to connect the application to the database.
True
2
A ____ is a copy of the data (database fields and records)that can be accessed by an application.

A) position property
B) child table
C) dataset
D) bound control
C
3
A(n)____ stores information in tables composed of columns and rows,similar to the format used in a spreadsheet.

A) relational database
B) object
C) bound control
D) dataset
A
4
When you drag an object from a dataset to an empty area on the form,the computer creates a control and automatically binds the object to it.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
5
A relational database can contain one or more tables.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
6
Each column in a table represents a record and each row represents a field.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
7
The field used to link a child table to a parent table is known as the ____ in the child table.

A) record
B) foreign key
C) cell
D) primary key
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
8
A group of related records is called a ____.

A) table
B) field
C) datagrid
D) primary key
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
9
Connecting an object to a control is called ____.

A) linking
B) Order By clause
C) LINQ
D) binding
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
10
In most tables,one of the fields uniquely identifies each record and is called the ____.

A) exception
B) foreign key
C) primary key
D) cell
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
11
The computer can retrieve data stored in a relational format both quickly and easily,but the data must be displayed in a specific order.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
12
A(n)____ is a group of related fields that contain all of the necessary data about a specific person,place,or thing.

A) object
B) dataset
C) record
D) exception
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
13
A(n)____ is an electronic file that contains an organized collection of related information.

A) field
B) computer database
C) dataset
D) exception
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
14
A BindingNavigator control displays table data in a row and column format,similar to a spreadsheet.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
15
If you do not take deliberate steps in your code to handle exceptions,Visual Basic "handles" them for you.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
16
Databases created using Microsoft Access are relational databases.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
17
A database file contained in a project is referred to as a logic database file.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
18
The controls connected to an object in a dataset are known as ____.

A) bound controls
B) navigator controls
C) tables
D) fields
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
19
When you drag an object from the Data Sources window to an existing control,the computer does not create a new control;rather,it merely binds the object to the existing control.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
20
A ____ is a single item of information about a person,place,or thing-such as a name,a salary amount,a Social Security number,or a price.

A) table
B) record
C) dataset
D) field
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
21
The tblItems table contains a numeric field named Price.Which of the following statements finds the lowest price for an item and assigns the result to the dblLowPrice variable? The tblItems table contains a numeric field named Price.Which of the following statements finds the lowest price for an item and assigns the result to the dblLowPrice variable?
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
22
To create a DataGridView control on the form,you would click on the ____ object in the Data Sources window and drag it to the form.

A) CustomerNum
B) InvoiceNum
C) CustomerDataSet
D) tblCustomer
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
23
The BindingSource object stores the position of the record pointer in its ____ property.

A) View
B) Position
C) Navigation
D) Cell
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
24
Which of the following statements selects all of the records in the tblStudents table? Which of the following statements selects all of the records in the tblStudents table?
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
25
The intersection of a row and a column in a DataGridView control is called a ____.

A) cell
B) table
C) record
D) key
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
26
The way Visual Basic saves changes to a local database file is determined by the file's ____ property.

A) BindingNavigator
B) Position
C) BindingSource
D) Copy to Output Directory
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
27
You are responsible for connecting the Access database that contains the tblCustomer table to an application.You must first use the Data Source Configuration Wizard to ____.

A) test to see if the database is connected to the application
B) add a new data source
C) preview the contents of the dataset
D) bind the controls to the dataset
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
28
You can use a(n)____ to specify both the records to select in a dataset and the order in which to arrange the records.

A) condition
B) parameter
C) query
D) aggregate operator
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
29
When an application is running,you can use the ____ control to move from one record to the next in the dataset,as well as to add or delete a record and save any changes made to the dataset.

A) DataSet
B) BindingNavigator
C) TableAdapter
D) BindingSource
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
30
If a user is not allowed to add a record,you should deselect the ____ check box within the task list for the DataGridView control.

A) Enable Adding
B) Enable Deleting
C) Edit Items
D) BindingNavigatorAddNewItem
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
31
The ____ object can be used to save to the database any changes made to the data contained in the DataSet.

A) TableAdapter
B) TblEmployBindingSource
C) BindingSource
D) DataGridView
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
32
A label,text box,or button can be added to the BindingNavigator control by accessing the control's task box and clicking ____.

A) AddNewItem
B) Properties
C) Insert Standard Items
D) Edit Items
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
33
You can create a query in Visual Basic 2012 using a language feature called ____.

A) ASP
B) SQL
C) Java
D) Language Integrated Query
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
34
The ____ object provides the connection between the DataSet and the bound controls on the form.

A) TableAdapter
B) DataGridView
C) BindingSource
D) BindingNavigator
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
35
The ____ clause of LINQ is used to arrange the records in either ascending (the default)or descending order by one or more fields.

A) Order By
B) condition
C) query
D) Where
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
36
The ____ statement is used for exception handling in a procedure.

A) Try...Catch
B) LINQ
C) Order By
D) aggregate
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
37
An error that occurs while an application is running is called a(n)____.

A) logic error
B) runtime error
C) exception
D) message
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
38
The BindingSource object's ____ methods move the record pointer to the first,last,next,or previous record in the dataset.

A) Position
B) View
C) Move
D) Navigation
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
39
The ____ object is responsible for retrieving the appropriate information from the database and storing it in the DataSet.

A) TableAdapter
B) TblEmployBindingSource
C) BindingSource
D) DataGridView
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
40
The ____ property (of the DataGridView)allows you to format a column's data,as well as change the column's width and alignment.

A) AutoSizeColumnsMode
B) DefaultCellStyle
C) BindingNavigator
D) DataGridView
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
41
Which of the following statements will select all invoices of $200.00 or more and arrange the invoices in ascending order by Customer number? Which of the following statements will select all invoices of $200.00 or more and arrange the invoices in ascending order by Customer number?
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
42
Write the statements to move the record pointer to the first and last records in the dataset for the Customer table.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
43
Write the code needed to include a Try...Catch statement that will handle an error that might occur while saving in an application.Use the following statements in the Try block,along with a message for the user of the Student Data Application that notifies the user the changes have been saved.Provide an error message if an exception occurs.
Write the code needed to include a Try...Catch statement that will handle an error that might occur while saving in an application.Use the following statements in the Try block,along with a message for the user of the Student Data Application that notifies the user the changes have been saved.Provide an error message if an exception occurs.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
44
Write a LINQ statement to select all records.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
45
Write a LINQ statement to select the records in descending order by the Quantity field.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
46
Write a LINQ statement to select all bicycles with a price greater than $450.Arrange the bicycles in descending order by price.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
47
Write a LINQ statement to select all blue bicycles.Order the bicycles in ascending order by quantity.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
48
What are the advantages to storing data in a relational database?
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
49
Write the statement needed to assign the contents of the records variable to the BindingSource object for the tblBicycle table.Explain why this should be done in an application.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
50
Which of the following statements will calculate a total for all of the unpaid invoices? Which of the following statements will calculate a total for all of the unpaid invoices?
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
51
What is the DataGridView control and how is it used?
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
52
Define the terms "record," "field," and "table." Provide examples of each term when you are defining them.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
53
Write the statements to move the record pointer to the previous and next records in the dataset for the Vehicle table.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
54
Write a LINQ statement to calculate the total value of the inventory.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
55
Relational databases contain multiple tables that relate to each other in some way.How are primary and foreign keys used in such a database?
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
56
You need to make sure the user of the application can add records but cannot delete any records.Which of the following needs to be performed?

A) Remove the Add new button from the TblCustomerBindingNavigator control.
B) Remove the Delete button from the TblCustomerBindingNavigator control.
C) Remove the Save button from the TblCustomerBindingNavigator control.
D) b and c
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
57
Write the code to calculate the average price of all of the bicycles in inventory.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 57 flashcards in this deck.