Populer Topics

Data Set

Dataset are object that contain data table. Where we can temporary store the data to use in our application.If our application requires work with data we can load data. Which provide our application with a local memory of the data to work with it.

We can work with the data in a dataset even if our application becomes disconnected from database.The dataset maintain information about changes to it’s data so updated can be sent back to the database. Whenever our application becomes reconnected the structure of dataset is similar to relational database.

It expose architecture object model of DataTable, Row, Columns, Constraints, and relationship we must member that do operation on the more then one table.Dataset will be only choice in disconnected architecture and it provide following property.

Property Description
DataSetName It will set or get name of dataset.
HasErrors It returns Boolean value to specifies there are error occurs while filling or updating the data.
Relation It returns the ser of relation in case we have load more data on one table to dataset.
Tables This is collection of all tables which are initialize the under dataset object.
Tables.Count It will returns no of table fill in the dataset object.

Dataset class provides following methods.

Method Description
Clear() Clear the data inside dataset.
AcceptChanges() Allow to access changes after calling this method changes are reflect to the Datatable.
WriteXml() Allow to create the write xml file dataset.
ReadXml() Allow to read xml file and copy it into the dataset.