Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

* * In Visual Basic In this exercise, you create a two - table SQL Server database. You also create an application that displays the

**In Visual Basic
In this exercise, you create a two-table SQL Server database. You also create an application that displays the database information in a DataGridView control. (F11.1F11.7, F11.10)
a. Create a Windows Forms application. Use the following names for the project and solution, respectively: Global Project and Global Solution. Save the application in the VB9e\Chap11 folder.
b. Create a SQL Server database named Global.mdf. Add the Salespeople table definition and records shown in Figure 11-70 to the database. Remember to click the Update button and then click the Update Database button after defining the table. Then, add the Sales table definition and records shown in Figure 11-71 to the database.
c. Open the Data Sources window and start the Data Source Configuration Wizard. Connect the Global.mdf file to the application. Include both tables in the dataset.
d. Open the DataSet Designer window by right-clicking GlobalDataSet in the Data Sources window and then clicking Edit DataSet with Designer. Add a relation to the window. Relate both tables by the SalesId field. (The Salespeople table is the parent table, and the Sales table is the child table.)
e. Right-click Fill,GetData() in the SalespeopleTableAdapter box and then click Configure. Open the Query Builder dialog box. Add the Sales table to the Diagram pane. The application will need to display the SalesId and Name fields from the Salespeople table along with the Sales field from the Sales table. Select the appropriate check box(es). Execute the query to verify that it retrieves the required information. Then, close the Query Builder dialog box and continue configuring the Fill and GetData methods.
f. Save the solution and then close the GlobalDataSet.xsd window.
g. Use the DataGridView tool, which is located in the Data section of the toolbox, to add a DataGridView control to the form. Drag the appropriate object from the Data Sources window to the control.
h. The DataGridView control should not allow the user to add, edit, or delete records. When the application is started, its interface should appear similar to the one shown in Figure 11-72. Save the solution and then start and test the application.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts Of Database Management

Authors: Joy L. Starks, Philip J. Pratt, Mary Z. Last

9th Edition

1337093424, 978-1337093422

More Books

Students also viewed these Databases questions

Question

For the circuit in Fig. 3.51, obtain v1 and v2. Figure 3.51 2

Answered: 1 week ago

Question

Explain the strength of acid and alkali solutions with examples

Answered: 1 week ago

Question

Introduce and define metals and nonmetals and explain with examples

Answered: 1 week ago