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 ...
Get Visual Basic® .NET by Example 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.