Working with Data Views

There's another handy kind of object that's much like a dataset—a data view object. You normally use datasets to hold local copies of data from a data source, but data views are also available as alternative data containers. They're much like read-only datasets—snapshots of your data (as the term data view suggests)—and can give you faster access to your data than datasets can. Their chief advantage is that they let you filter data from a dataset according to criteria you set, without having to retrieve that data from the data source again.

You can use SQL-like expressions in a data view's RowFilter property to filter the records you want to take a look at. For example, say that you want to look at only those authors whose ...

Get Microsoft® Visual C#® .NET 2003 Kick Start now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.