DataViews

A DataView provides a view into a data source. For example, a program can use one or more DataViews to select different records from a DataTable in a DataSet. Program ContactsLetterLists, shown in Figure 8.15, uses a DataView object to make selecting a subset of the records in a DataSet relatively easy. When you select a letter from the ComboBox on the left, the ListBox displays the records that begin with that letter. If you select the ComboBox’s special entry <New>, the ListBox displays any new records you have just created. Finally, if you select the <All> item, the ListBox shows all the records in the database.

Figure 8.15. Program ContactsLetterLists uses a TreeView control for navigation.

To build this program, open the ContactsListCombined ...

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.