8.03.2012

ADO.Net Difference FAQs-2

1.Difference between Typed DataSet and Untyped DataSet
S.No
Typed DataSet
Untyped DataSet
1
It 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.
2
They 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.
4
Performance is slower in case of strongly typed dataset.
Performance is faster in case of Untyped dataset.
5
In 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.No
DataView
DataTable
1
Read-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 existing DataTable.
Can be created empty and then populated
3
Data is a reference to an existing DataTable, and does not consume space.
Data takes storage space.
4
Can 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.
5
Can return a DataTable version of the view
Can be cloned
6
A live reference to a DataTable; any changes in the DataTable data is immediately reflected in the view.
Is source data; does not contain references
7
Supports calculated columns, which are columns with a value calculated on the fly by combining or manipulating other columns.
Does not support calculated columns
8
Can hide or show selected columns
No row or column hiding

3.Difference between Connected and Disconnected Environment

S.No
Connected Environment
Disconnected Environment
1
Connected Environment needs a constantly connection of user to data source while performing any operation.
Disconnected Environment does not need any connection.
2
Only 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.
4
It is slower in speed.
Disconnected Environment has a good speed.
5
We get updated data in it.
There is a problem of dirty read.

No comments:

Post a Comment