Exam 13: Working With Access Databases and Linq

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

The following sample of code contains errors. Rewrite the incorrect statements to correct all errors -Private Sub TblItemsBindingNavigatorSaveItem_Click(ByVal sender As System.Object,ByVal e As System.EventArgs)Handles TblItemsBindingNavigatorSaveItem.Click Try Validate() Me.TblItemsBindingSource Me.TableAdapterManager.UpdateAll(Me.ItemsDataSet) MessageBox.Show("Changes saved","Books Galore", MessageBoxButtons.OK, MessageBoxIcon.Information) Catch ex MessageBox.Show(ex.Message,"Books Galore", MessageBoxButtons.OK, MessageBoxIcon.Information) End End Sub

Free
(Essay)
4.9/5
(37)
Correct Answer:
Verified

Private Sub TblItemsBindingNavigatorSaveItem_Click(ByVal sender As System.Object,ByVal e As System.EventArgs)Handles TblItemsBindingNavigatorSaveItem.Click
Try
Me.Validate()
Me.TblItemsBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.ItemsDataSet)
MessageBox.Show("Changes saved","Books Galore",
MessageBoxButtons.OK,
MessageBoxIcon.Information)
Catch ex As Exception
MessageBox.Show(ex.Message,"Books Galore",
MessageBoxButtons.OK,
MessageBoxIcon.Information)
End Try
End Sub

Writing LINQ Statements The tblBicycle table contains five fields: ItemNum, ItemName, Color, Price, and Quantity. The Price and Quantity fields are numeric; all other fields are text. The dataset name is BicycleDataSet. -Write a LINQ statement to calculate the total value of the inventory.

Free
(Essay)
4.7/5
(39)
Correct Answer:
Verified

Dim dblInventoryValue As Double = Aggregate bike In
BicycleDataSet.tblBicycle
Select bike.Price * bike.Quantity
Into Sum()

Case 1 - MaidToOrder The database for a cleaning service company contains the following table, named tblCustomer, that includes customer invoice data. The InvoiceNum, CustomerNum, and InvoicePaid fields contain text. The InvoiceDate field contains dates. The InvoiceAmt field contains numbers. InvoiceNum CustomerNum InvoiceDate InvoiceAmt InvoicePaid 631 13020 01/15/2013 200.00 632 15411 01/20/2013 685.00 633 10002 01/23/2013 75.00 634 13104 01/23/2013 150.00 635 12124 01/26/2013 75.00 636 13328 02/02/2013 350.00 637 10206 02/02/2013 175.00 638 10334 02/07/2013 450.00 -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.

Free
(Multiple Choice)
4.9/5
(48)
Correct Answer:
Verified

D

Define the terms "record," "field," and "table." Provide examples of each term when you are defining them.

(Essay)
4.8/5
(32)

What are the advantages to storing data in a relational database?

(Essay)
5.0/5
(43)

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?

(Multiple Choice)
4.9/5
(34)

You can use a(n)____ to specify both the records to select in a dataset and the order in which to arrange the records.

(Multiple Choice)
4.9/5
(29)

A ____ is a copy of the data (database fields and records)that can be accessed by an application.

(Multiple Choice)
4.9/5
(36)

Databases created using Microsoft Access are relational databases.

(True/False)
4.8/5
(37)

In most tables,one of the fields uniquely identifies each record and is called the ____.

(Multiple Choice)
4.8/5
(30)

A BindingNavigator control displays table data in a row and column format,similar to a spreadsheet.

(True/False)
4.9/5
(45)

Connecting an object to a control is called ____.

(Multiple Choice)
4.9/5
(30)

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.

(True/False)
4.9/5
(40)

Case 1 - MaidToOrder The database for a cleaning service company contains the following table, named tblCustomer, that includes customer invoice data. The InvoiceNum, CustomerNum, and InvoicePaid fields contain text. The InvoiceDate field contains dates. The InvoiceAmt field contains numbers. InvoiceNum CustomerNum InvoiceDate InvoiceAmt InvoicePaid 631 13020 01/15/2013 200.00 632 15411 01/20/2013 685.00 633 10002 01/23/2013 75.00 634 13104 01/23/2013 150.00 635 12124 01/26/2013 75.00 636 13328 02/02/2013 350.00 637 10206 02/02/2013 175.00 638 10334 02/07/2013 450.00 -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 ____.

(Multiple Choice)
4.8/5
(26)

Writing LINQ Statements The tblBicycle table contains five fields: ItemNum, ItemName, Color, Price, and Quantity. The Price and Quantity fields are numeric; all other fields are text. The dataset name is BicycleDataSet. -Write a LINQ statement to select all bicycles with a price greater than $450.Arrange the bicycles in descending order by price.

(Essay)
4.8/5
(28)

The BindingSource object stores the position of the record pointer in its ____ property.

(Multiple Choice)
4.7/5
(43)

Write the statements to move the record pointer to the previous and next records in the dataset for the Vehicle table.

(Essay)
4.9/5
(33)

Writing LINQ Statements The tblBicycle table contains five fields: ItemNum, ItemName, Color, Price, and Quantity. The Price and Quantity fields are numeric; all other fields are text. The dataset name is BicycleDataSet. -Write a LINQ statement to select all records.

(Essay)
4.9/5
(35)

If a user is not allowed to add a record,you should deselect the ____ check box within the task list for the DataGridView control.

(Multiple Choice)
4.8/5
(38)

The computer can retrieve data stored in a relational format both quickly and easily,but the data must be displayed in a specific order.

(True/False)
4.9/5
(39)
Showing 1 - 20 of 60
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)