ADO.NET | |
DataSet is an in-memory cache of data retrieved from data source; it consists of collection of DataTable objects. | |
System.Data | |
Yes | |
Yes, we can relate tables in DataSet with DataRelation objects and we can enforce UniqueConstraint and ForeignKeyConstraint objects. | |
DataSet.Clear() method clears the data from all tables in DataSet | |
Yes, ReadXml() is used to read xml document that includes both schema and data. | |
DataSet.Clone() :- Copies the structure of the DataSet, i.e schema of all data tables, relations and constraints. It does not copy any data. DataSet.Copy() :- Copies both the structure and data of the DataSet. | |
By using DataSet AcceptChanges() method, we can update database | |
By invoking AcceptChanges on the DataSet causes AcceptChanges to be called on each table with in DataSet. Calling AcceptChanges at the DataTable level causes the AcceptChanges method for each DataRow to be called. When you call AcceptChanges on the DataSet, any DataRow objects still in edit-mode successfully end their edits. The RowState property of each DataRow also changes; Added and Modified rows become Unchanged, and Deleted rows are removed. | |
DataSet.HasChanges() :- method returns true if the DataSet has changes; otherwise false. | |
ADO.NET |
ADO.Net Interview Question on DataSet
ADO.Net Interview Question on DataSet page 1
Posted by
Ramu