Skip to content

Latest commit

 

History

History
85 lines (56 loc) · 4.9 KB

File metadata and controls

85 lines (56 loc) · 4.9 KB
title description ms.date ms.assetid
DataSets, DataTables, and DataViews
Learn several ways to work with an ADO.NET DataSet, a memory-resident representation of data that provides a consistent relational programming model.
03/30/2017
6d4c4b69-8919-4224-8a65-6cca1c61b48f

DataSets, DataTables, and DataViews

The ADO.NET xref:System.Data.DataSet is a memory-resident representation of data that provides a consistent relational programming model regardless of the source of the data it contains. A xref:System.Data.DataSet represents a complete set of data including the tables that contain, order, and constrain the data, as well as the relationships between the tables.

There are several ways of working with a xref:System.Data.DataSet, which can be applied independently or in combination. You can:

  • Programmatically create a xref:System.Data.DataTable, xref:System.Data.DataRelation, and xref:System.Data.Constraint within a xref:System.Data.DataSet and populate the tables with data.

  • Populate the xref:System.Data.DataSet with tables of data from an existing relational data source using a DataAdapter.

  • Load and persist the xref:System.Data.DataSet contents using XML. For more information, see Using XML in a DataSet.

A strongly typed xref:System.Data.DataSet can also be transported using an XML Web service. The design of the xref:System.Data.DataSet makes it ideal for transporting data using XML Web services. For an overview of XML Web services, see XML Web Services Overview. For an example of consuming a xref:System.Data.DataSet from an XML Web service, see Consuming a DataSet from an XML Web Service.

In this section

Security guidance
Provides security guidance for xref:System.Data.DataSet and xref:System.Data.DataTable.

Creating a DataSet
Describes the syntax for creating an instance of a xref:System.Data.DataSet.

Adding a DataTable to a DataSet
Describes how to create and add tables and columns to a xref:System.Data.DataSet.

Adding DataRelations
Describes how to create relations between tables in a xref:System.Data.DataSet.

Navigating DataRelations
Describes how to use the relations between tables in a xref:System.Data.DataSet to return the child or parent rows of a parent-child relationship.

Merging DataSet Contents
Describes how to merge the contents of one xref:System.Data.DataSet, xref:System.Data.DataTable, or xref:System.Data.DataRow array into another xref:System.Data.DataSet.

Copying DataSet Contents
Describes how to create a copy of a xref:System.Data.DataSet that can contain schema as well as specified data.

Handling DataSet Events
Describes the events of a xref:System.Data.DataSet and how to use them.

Typed DataSets
Discusses what a typed xref:System.Data.DataSet is and how to create and use it.

DataTables
Describes how to create a xref:System.Data.DataTable, define the schema, and manipulate data.

DataTableReaders
Describes how to create and use a xref:System.Data.DataTableReader.

DataViews
Describes how to create and work with DataViews and work with xref:System.Data.DataView events.

Using XML in a DataSet
Describes how the xref:System.Data.DataSet interacts with XML as a data source, including loading and persisting the contents of a xref:System.Data.DataSet as XML data.

Consuming a DataSet from an XML Web Service
Describes how to create an XML Web service that uses a xref:System.Data.DataSet to transport data.

Related sections

What's New in ADO.NET
Introduces features that are new in ADO.NET.

ADO.NET Overview
Provides an introduction to the design and components of ADO.NET.

Populating a DataSet from a DataAdapter
Describes how to load a DataSet with data from a data source.

Updating Data Sources with DataAdapters
Describes how to resolve changes to the data in a DataSet back to the data source.

Adding Existing Constraints to a DataSet
Describes how to populate a DataSet with primary key information from a data source.

See also