Using the Details View to Create the Detail Form

In the same way that you want to allow the user to search for a customer, you'd like to be able to search for a supplier. In addition, when looking at the supplier, you'd like to see which products that supplier offers.

Adding New Tables

The first step is to add new tables to the NorthWindDataSet. To do so, choose the menu selections Data → ShowDataSources. Right-click on the NorthWindDataSet and choose Edit Data Source With Designer.

This opens the NorthwindDataSet.xsd designer. Right-click anywhere in the designer (except on the Customers table) and choose Add → DataTable, as shown in Figure 2-11.

Adding a new data table adapter

Figure 2-11. Adding a new data table adapter

This opens the DataComponents Configuration Wizard. The first step is to choose the connection you want to use (in this case, you can continue to use the NorthWind Connection).

The next step is to choose whether you are using SQL Statements, new stored procedures, or existing stored procedures. In this case, you'll use SQL Statements.

In the next step, click on the Query Builder window . The Add Table dialog will open, as shown in Figure 2-12.

Adding a table

Figure 2-12. Adding a table

Select the Suppliers table. Click Add and then click Close. When you return to the Query Builder window, select the checkbox beside ...

Get Programming Visual Basic 2005 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.