1.Difference
between Typed DataSet and Untyped DataSet
-
S.NoTyped DataSetUntyped DataSet1It provides additional methods, properties and events and thus it makes it easier to use.It is not as easy to use as strongly typed dataset.2They have .xsd file (Xml Schema definition) file associated with them and do error checking regarding their schema at design time using the .xsd definitions.They do not do error checking at the design time as they are filled at run time when the code executes.3
We will get advantage of intelliSense in VS. NET. We cannot get an advantage of intelliSense.4Performance is slower in case of strongly typed dataset.Performance is faster in case of Untyped dataset.5In complex environment, strongly typed dataset's are difficult to administer.Untyped datasets are easy to administer.
Typed
DataSets use explicit names and DataTypes for their members.
ex:
northwindDataSet.Products.ProductNameColumn.Caption
= "pnames";
UnTyped
DataSets use table and column collections for their members
ex:
ds.Tables["emp"].Columns["eno"].ReadOnly=true;
2.Difference
between DataView and DataTable
-
S.NoDataViewDataTable1Read-only i.e., DataView can be used to select the data.Read/Write i.e., Datatable can be used to edit or select or delete or insert a data.2
Is a reference to an existing DataTable
. Cannot be populated from scratch; must be instantiated with a reference to an existingDataTable
.Can be created empty and then populated3Data is a reference to an existing DataTable
, and does not consume space.Data takes storage space.4Can sort or filter rows without modifying the underlying data. Rows and columns can be hidden and revealed repeatedly.Can add/edit/delete rows, columns, and data, and all changes are persistent.5Can return a DataTable
version of the viewCan be cloned6A live reference to a DataTable
; any changes in theDataTable
data is immediately reflected in the view.Is source data; does not contain references7Supports calculated columns, which are columns with a value calculated on the fly by combining or manipulating other columns.Does not support calculated columns8Can hide or show selected columnsNo row or column hiding
3.Difference
between Connected and Disconnected Environment
-
S.NoConnected EnvironmentDisconnected Environment1Connected Environment needs a constantly connection of user to data source while performing any operation.Disconnected Environment does not need any connection.2Only one operation can be performed at a time in connection Environment.Multiple operations can be performed.3
DataReader is used in Connection Environment. DataSet is used in it.4It is slower in speed.Disconnected Environment has a good speed.5We get updated data in it.There is a problem of dirty read.
No comments:
Post a Comment