Creating DataRelation Objects in Visual Studio .NET

Chapter 8

Sorting, Searching, and Filtering

In Chapter 5, you learned how to use a DataAdapter object to fetch the results of queries into a DataSet object. In Chapter 6, which covered the DataSet object and the objects it contains, you learned how to examine the results of such queries by looping through the DataRow objects in a DataTable.

But how do you locate a specific row in your DataTable by a value or set of values? How do you apply a filter so that only rows that satisfy the specified criteria are visible? And how do you control the sort order for the rows you want to access or display?

This chapter will answer these questions and more as it covers the Find method of the DataRowCollection class and the Select method of the DataTable class and introduces the DataView and DataRowView objects.



Microsoft ADO. NET Core Reference
Microsoft ADO.NET (Core Reference) (PRO-Developer)
ISBN: 0735614237
EAN: 2147483647
Year: 2002
Pages: 104
Authors: David Sceppa

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net