# Step 2 of 8: Configuring a Data Connection and Data Adapter

## Content

In this step you will add three separate data adapters for each table: products, categories, and suppliers. Since the dataset we use contains separate data adapters for each table we must call each adapter’s **Fill** method separately.

1. From the Toolbox, double-click the **OleDbDataAdapter** component. If it’s not in the toolbox, right-click and select **Choose Items**. On the .NET Framework Components tab in the dialog box, select **OleDbDataAdapter**. The OleDbDataAdapter appears in the component tray and the **Data Adapter Configuration Wizard** appears.
2. In the Data Adapter Configuration Wizard, choose the connection you wish to use for the data adapter from the drop-down listbox (in this case, **C:\\Users\\UserName\\Documents\\ComponentOne Samples\\Common\\C1Nwind.mdb**) and then click **Next**.
3. The **Use SQL Statements** is selected by default, click **Next**.
4. Copy and paste the following SQL statement in the textbox of the **Data Adapter Configuration Wizard**:

> SELECT Products.\*
>
> FROM Products

5. Click **Next** and then click **Yes** to add primary key columns to your query.
6. Click **Finish.**
7. Set the **OldDataAdaper1 Name** property to **productsDataAdapter** and **OleDbConnection1 Name** property to **productsConnection**.
8. Add another **OleDbDataAdapter**.
9. In the **Data Adapter Configuration Wizard**, choose the connection you wish to use for the data adapter from the drop-down listbox (in this case **C:\\Users\\UserName\\Documents\\ComponentOne Samples\\Common\\C1Nwind.mdb)** and then click **Next**.
10. The **Use SQL Statements** is selected by default, click **Next**.
11. Copy and paste the following SQL statement in the textbox of the **Data Adapter Configuration Wizard**:

> SELECT Categories.\*
> 
> FROM Categories

12. Click **Next** and then click **Yes** to add primary key columns to your query.
13. Click **Finish**.
14. Set the **OldDataAdaper2 Name** property to **categoriesDataAdapter** and **OleDbConnection2 Name** property to **categoriesConnection**.
15. Add another **OleDbDataAdapter**.
16. In the **Data Adapter Configuration Wizard**, choose the connection you wish to use for the data adapter from the drop-down listbox (in this case **C:\\Users\\UserName\\Documents\\ComponentOne Samples\\Common\\C1Nwind.mdb**) and then click **Next**.
17. The **Use SQL Statements** is selected by default, click **Next**.
18. Copy and paste the following SQL statement in the textbox of the **Data Adapter Configuration Wizard**:

> SELECT Suppliers.\*
> 
> FROM Suppliers

19. Click **Next** and then click **Yes** to add primary key columns to your query.
20. Click **Finish**.
21. Set the **OldDataAdaper3 Name** property to **SuppliersDataAdapter** and **OleDbConnection3 Name** property to **SuppliersConnection**.