wile_e_coyote
asked on
Typed vs Untyped DataSets
What are the pro's and con's of typed vs untyped DataSets when used with Web Services? This is related to my other post regarding slow client performance when creating the web service proxy object. I'm wondering if
having each web method return an untyped DataSet would result in a smaller proxy object on the client.
In our case, currently each typed DataSet encapsulates a single DataTable. We use the DataSet for both and update/insert/delete operations.
having each web method return an untyped DataSet would result in a smaller proxy object on the client.
In our case, currently each typed DataSet encapsulates a single DataTable. We use the DataSet for both and update/insert/delete operations.
From MSDN:
Datasets can be typed or untyped. A typed dataset is a dataset that is first derived from the base DataSet class and then uses information in an XML Schema file (an .xsd file) to generate a new class. Information from the schema (tables, columns, and so on) is generated and compiled into this new dataset class as a set of first-class objects and properties.
Because a typed DataSet class inherits from the base DataSet class, the typed class assumes all of the functionality of the DataSet class and can be used with methods that take an instance of a DataSet class as a parameter
An untyped dataset, in contrast, has no corresponding built-in schema. As in a typed dataset, an untyped dataset contains tables, columns, and so on — but those are exposed only as collections. (However, after manually creating the tables and other data elements in an untyped dataset, you can export the dataset's structure as a schema using the dataset's WriteXmlSchema method.)
You can use either type of dataset in your applications. However, Visual Studio has more tool support for typed datasets, and they make programming with the dataset easier and less error-prone.
Datasets can be typed or untyped. A typed dataset is a dataset that is first derived from the base DataSet class and then uses information in an XML Schema file (an .xsd file) to generate a new class. Information from the schema (tables, columns, and so on) is generated and compiled into this new dataset class as a set of first-class objects and properties.
Because a typed DataSet class inherits from the base DataSet class, the typed class assumes all of the functionality of the DataSet class and can be used with methods that take an instance of a DataSet class as a parameter
An untyped dataset, in contrast, has no corresponding built-in schema. As in a typed dataset, an untyped dataset contains tables, columns, and so on — but those are exposed only as collections. (However, after manually creating the tables and other data elements in an untyped dataset, you can export the dataset's structure as a schema using the dataset's WriteXmlSchema method.)
You can use either type of dataset in your applications. However, Visual Studio has more tool support for typed datasets, and they make programming with the dataset easier and less error-prone.
ASKER
naveenkohli and Massiel_VB
These are both good answers - how about splitting the points? (You'll each get 25 points)
These are both good answers - how about splitting the points? (You'll each get 25 points)
sounds good :-)
ASKER
naveenkohli - your points are at
https://www.experts-exchange.com/questions/20332610/Points-for-naveenkohli.html
Massiel_VB - your points are at
https://www.experts-exchange.com/questions/20332609/Points-for-Massiel-VB.html
https://www.experts-exchange.com/questions/20332610/Points-for-naveenkohli.html
Massiel_VB - your points are at
https://www.experts-exchange.com/questions/20332609/Points-for-Massiel-VB.html
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The only disadvantage i can think of this that if the schema of your table changes, then you will have to recreate the class and compile the code again.