Purchase Solution

Using a Menu to Manipulate Database Table Records

Not what you're looking for?

Ask Custom Question

- Start VB NET and create a new solution named YourName_Unit02.sln setting the drive designator as necessary.

- Create the form's user interface with the necessary labels and text boxes to display the fields from the underlying table.
- Create a main menu for the form. Create a menu title having a menu item named Exit to exit the solution. On the Edit menu, create menu items to add, edit, and cancel editing of the current record, and to update and delete database records. On the Navigate menu, create menu items to locate the first, previous, next, and last record in the database table.
- Using the Data tab on the Toolbox, create an instance of the OleDbConnection control, and configure it so that you establish a connection with the database named Chapter.08Data08Factory.mdb, setting the drive designator as necessary.
- Generate a DataSet for the DataAdapter you just created. Set the DataSet name to dsParts.
- Write the necessary code to bind the fields in the underlying DataSet to the text boxes that you just created. Perform this task when the form loads.
- Create the code for the Add, Edit, Update, Cancel, and Delete menu items. So that the user cannot add or delete a record while the current record is being edited, create a sub procedure named EditState to enable and disable menu items as necessary. Enable or disable the text boxes also.
- Your solution should calculate the gross profit for the current item by subtracting the cost from the sales price. The total inventory at cost is calculated by multiplying the cost by the quantity on hand. You should display these output values whenever tile user locates a different record, or updates a record. I-lint: Create a sub procedure and call that procedure from the navigation menu items.

Field Name
Description
Data Type

fldPartNumber
Unique Identification Number
Long Integer

fldDescription
Description on part
String

fldCost
Cost of part
Single

fldSalesPrice
Sales price of part
Single

fldQuantityOnHand
Number of items in inventory
Integer

Provide a flowchart and pseudocode to accompany this exercise.

Purchase this Solution

Solution Summary

The solution attaches the application as well as a flowchart of the process and pseudocode to make it clear.

Purchase this Solution


Free BrainMass Quizzes
C# variables and classes

This quiz contains questions about C# classes and variables.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

C++ Operators

This quiz tests a student's knowledge about C++ operators.