Chapter 7. DataTables

The DataTable is an in-memory data store that contains DataColumn and Constraint objects that define the schema of the data. The actual data is stored as a collection of DataRow objects within the DataTable . Both the schema and the data can be created entirely programmatically, retrieved as the result of a query against a data source using a .NET managed data provider, or loaded from an XML document or stream through the DataSet to which it belongs.

The DataTable and the DataReader are similar because they both provide access to the results of a query that can then be exposed through collections of row and column objects. The primary difference is that the DataTable is a disconnected class that places little restriction on how the data within it is accessed and allows that data to be filtered, sorted, and modified. The DataReader is a connected class that provides little functionality beyond forward-only, read-only access to the results of the query.

ADO. NET in a Nutshell
ADO.NET in a Nutshell
ISBN: 0596003617
EAN: 2147483647
Year: 2005
Pages: 415 © 2008-2017.
If you may any questions please contact us: