O'Reilly logo

Visual Basic® .NET by Example by Bob Donald, Gabriel Oancea

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Binding a DataSet to a Control

One of the most exciting aspects of DataSets is that they can be bound to a control. This allows controls to automatically display the data within a DataSet without you having to write any specific code. Let's walk through an example of how to do this using a simple application.

First, create a new Windows application project. On the main form in the Form Designer window, drag the authors table from the Server Explorer window onto the main form exactly as described in the previous chapter. (This involves navigating the Server Explorer tree into the installed SQL Server database installed on your machine—assuming you have SQL Server.) This adds a SqlDataConnection and a SqlDataAdapter to the Form class. Update the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required