GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Microsoft  >  ADO.NET 2.0
Go To First  |  Previous Question  |  Next Question 
 ADO.NET 2.0  |  Question 12 of 19    Print  
What is basic difference between Dataset and Typed Dataset. When to use Typed dataset?

  
Total Answers and Comments: 6 Last Update: June 01, 2009     Asked by: Sanjiv Sharma 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Urvil Shah
 
TypeDataSet - You have to define the type of the column when creating the TypeDataset. It is useful when you know the type of the data retrieved from database. You can use type dataset as the business entity. It is physically available. Developed at design time. Performance is issue when you implement SOA.

Dataset - It is normal dataset. created runtime. No need to worry about the type. Any type of data you can fill it. Creates all the column dynamically.


Above answer was rated as good by the following members:
Ag2703
April 16, 2007 05:11:51   #1  
Karthik D V        

RE: What is basic difference between Dataset and Typed...

Typed DataSet is precompiled one

For Example in Normal DataSet this is how we use to get data.

ds.Tables["Employee"].Rows[0][0]

In typed DataSet usage is strongly bound.

ds.EmployeeTable.Rows[0].EmpIdColumn

Here every thing is typed no need to use index/name to identify table or column name.

Typed dataset yields less errors than mornal dataset in all the way.

Typed Dataset is faster than the normal dataset .

The problem of typed dataset is dynamic behaviour
(This is also possible if we build typed dataset on the fly usingm reflection)


 
Is this answer useful? Yes | No
June 14, 2007 05:54:45   #2  
Amit kulshrestha        

RE: What is basic difference between Dataset and Typed...
As all of us know we can specify the Data type when we create a DataColumn for a DataTable. This is to enforce the runtime Type-safety for the column so that only data of specified data type can be stored in the column. In the same way in most of the cases we prefer to make a DataSet itself as Type-safe so as to protect it from runtime mismatch. Hence Typed DataSets generate classes that expose each object there in the DataSet in Type-safe manner. These classes inherits directly from DataSet class.
 
Is this answer useful? Yes | No
June 20, 2007 11:36:07   #3  
Urvil Shah        

RE: What is basic difference between Dataset and Typed...
TypeDataSet - You have to define the type of the column when creating the TypeDataset. It is useful when you know the type of the data retrieved from database. You can use type dataset as the business entity. It is physically available. Developed at design time. Performance is issue when you implement SOA.

Dataset - It is normal dataset. created runtime. No need to worry about the type. Any type of data you can fill it. Creates all the column dynamically.

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
February 14, 2008 20:13:38   #4  
amitkumar316 Member Since: February 2008   Contribution: 9    

RE: What is basic difference between Dataset and Typed Dataset. When to use Typed dataset?

A typed dataset uses .xsd file i.e. the XML file to get information about the tables & columns. So we can use the table names & column names directly. We can derive a new dataset from a typed dataset.

In a general dataset the tables & columns are exposed as collections & we have to make use of them.

e.g. consider a dataset 'ds' having a table 'emp' with a column 'eid' & we want to retrive the 1st record.

in typed dataset:- ds.emp(0).eid

in dataset:- ds.tables("emp")(0).columns("eid")


 
Is this answer useful? Yes | No
July 12, 2008 17:29:05   #5  
syed1ahmad Member Since: May 2008   Contribution: 1    

RE: What is basic difference between Dataset and Typed Dataset. When to use Typed dataset?
Typed dataset is design time concept and it is type safe mechanish.
typed dataset field can be accessed as properties programatically.

Typed Dataset is more faster as compated to the normal dataset 'coz of the type casting is not required.

 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    
June 01, 2009 09:49:44   #6  
albu77 Member Since: September 2007   Contribution: 9    

RE: What is basic difference between Dataset and Typed Dataset. When to use Typed dataset?
With normal dataset you have to always have in mind the schema of your source of data.
Typed dataset are a generated class derived from the dataset and in which every thing from the schema is included in the types generated. So when you use the typed dataset you have full help from Intellisense and you avoid a lot of compilation and execution errors.

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape