Tuesday, May 5, 2009

Explain DataSet Object

Dataset is a disconnected, in-memory representation of data. It can contain multiple data table from different database.

They contain multiple Datatable objects, which contain columns and rows, just like normal data base tables. You can even define relations between tables to create parent-child relationships.

Example
DataSet dsEmp = new DataSet();

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

1. Programmatically create a DataTable, DataRelation, and Constraint within a DataSet and populate the tables with data.

2. Populate the DataSet with tables of data from an existing relational data source using a DataAdapter.

3. Load and persist the DataSet contents using XML.

For more understanding look for DataAdapter Object Article.

No comments:

Post a Comment