DataSet
What is Typed Dataset and UnTyped Dataset? When to use this ?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
KalaiPosted May 26, 2014, 12:59 AM
Abhishek KumarPosted May 23, 2014, 8:03 AM
Typed dataset :
A typed DataSet is a class that derives from a DataSet. As such, it inherits all the methods, events, and properties of a DataSet. Additionally, a typed DataSet provides strongly typed methods, events, and properties. This means you can access tables and columns by name, instead of using collection-based methods.
Creation :
RightClick solution explorer -> Add New Item then select DataSet.xsd
Untyped dataSet you can created in following manner by creating object of DataSet Class.
Dataset has one table with column name Name.
DataSet ds = new DataSet();
DataTable dt = new DataTable();
DataColumn cname= new DataColumn("Name");
dt.Columns.Add(cname);
ds.Tables.Add(dt);
Hope this helps.
Akhil MittalPosted May 23, 2014, 8:02 AM
example:
northwindDataSet.Products.ProductNameColumn.Caption = "pnames";
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.
UnTyped DataSets:
1)UnTyped DataSets use table and column collections for their members
ex:
ds.Tables["emp"].Columns["eno"].ReadOnly=true;
2)They do not do error checking at the design time as they are filled at run time when the code executes.
Akhil MittalPosted May 23, 2014, 8:02 AM
Jignesh TrivediPosted May 23, 2014, 7:55 AM
hi,
Please refer following link it might help you
http://www.c-sharpcorner.com/UploadFile/rupadhyaya/TypedDataSets12032005021013AM/TypedDataSets.aspx
http://collecteddotnet.wordpress.com/2013/05/01/typed-dataset-and-untyped-dataset/
Hussain AhmedPosted May 23, 2014, 7:52 AM
http://net-informations.com/faq/ado/typed-dataset.htm
AND
https://sites.google.com/site/interviewsharing/asp-net/difference-between-typed-dataset-and-untyped-dataset