Using The Data Adapter

Using the data adapter, you can build a functional database form with very little code. Open the form in design mode and click the new data adapter. In the Properties window, give it a meaningful name, such as daContacts.

Next, add a DataSet for the adapter to connect to the database. Click the adapter and look at the Properties window. Below all the properties, there are several commands, shown in Figure 4.23. Later if you want to change the data adapter’s settings, click the Configure Data Adapter command to start the Data Adapter Configuration Wizard again. For now, click the Generate Dataset command.

Figure 4.23. The Generate Dataset command attaches the data adapter to a new DataSet.

In the dialog shown in

Get Visual Basic® .NET Database Programming 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.