What is a Typed Dataset in ADO.NET? Why do we use a Typed DataSet? What is the difference between
a Typed and an UnTyped DataSet?
Typed DataSet - When a created DataSet derives from the DataSet class, that applies the
information contained in the XSD to create a Typed class, this DataSet is said to be a Typed Dataset.
Information from the schema whic comprises the tables, columns, and rows is created and compiled to a
new DataSet derived from the XSD. The Typed DataSet class features all functionality of the DataSet class.
This may be used with methods that take an instance of the DataSet class as a parameter.
Call Stored Procedure
Note that an UnTyped DataSet does not have any schema. It is exposed simply as a mere collection.
How to create a Typed DataSet? -
Write click your project in the Solution Explorer.
Click Add New Item.
This adds a new XSD to the project. The schema created may be viewed as an XML. When this xsd file
is compiled, two files are created by Visual Studio. The first file that contains the .vb or .cs
extension contains the information about the proxy class. This class contains methods & properties that are
required to access the database data. The second file has an extension xsx and this contains
information about the layout of the XSD.
More Interview Questions...