Thursday 17 September 2015

Disconnected Mode(DataSet)

Disconnected Mode(DataSet)
What is DataSet:- The DataSet, which is an in-memory cache of data retrieved from a data source, is a major component of the ADO.NET architecture. The DataSet consists of a collection of DataTable objects that you can relate to each other with DataRelation objects. You can also enforce data integrity in the DataSet by using the UniqueConstraint and ForeignKeyConstraint objects.

DataSet is a disconnected orient architecture that means there is no need of active connections during work with datasets and it is a collection of DataTables and relations between tables. It is used to hold multiple tables with data. 

Namespace of DataSet:-
 using System.Data;

DataSet

****DataTable
********DataRow
********DataColumn


DataSet constructors:-
  1. DataSet():- Initializes a new instance of the DataSet class.
  2. DataSet(String):- Initializes a new instance of a DataSet class with the given name.
  3. DataSet(SerializationInfo, StreamingContext):- Infrastructure. Initializes a new instance of a DataSet class that has the given serialization information and context.
  4. DataSet(SerializationInfo, StreamingContext, Boolean):- Infrastructure. Initializes a new instance of the DataSet class.


Syntax :-
  

[SerializableAttribute]
public class DataSet : MarshalByValueComponent, IListSource, 
 IXmlSerializable, ISupportInitializeNotification, ISupportInitialize, ISerializable



The DataSet inherits the MarshalByValueComponent class.

Now, by DataSet we can perform many operations:-

  1. Insert
  2. Delete
  3. Update
  4. Search

No comments:

Post a Comment