Programmatically Configuring the DataAdapter Using Your Own Code

To prepare for this project, create a Windows Forms project and call it ADOBook06-03. You can copy the form file from the previous project into this project. We will then modify the code in the new project. You can also download the code from the book’s web site if you don't want to type it in.

In our next exercise we will look into how to manually set up the Data Adapter so that the Update statement will work automatically and we will not have to assign our parameters manually. In order to do this in a less confusing way we will use a simpler Select statement that does not select all of the fields in the table. Use the following Select statement:

 Select CustomerID, CompanyName, ...

Get ADO.NET Programming in Visual Basic™ .NET 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.