Friday, June 13, 2008

Difference between Typed data set and Untyped data set?

The difference between the two lies in the fact that a Typed DataSet has a schema and An Untyped DataSet does not have one. It should be noted that the Typed Datasets have more support in Visual studio. A typed dataset gives us easier access to the contents of the table through strongly typed programming that uses information from the underlying data schema. A typed DataSet has a reference to an XML schema file:

Dim s As String
s = dsCustomersOrders1.Customers(0).CustomerID

In contrast, if we are working with an untyped DataSet, the equivalent code looks like this:

Dim s As String s = CType ( dsCustomersOrders1.Tables ( "Customers" ). Rows(0). Item
("CustomerID"), String)

As the syntax is much simpler and more practical, using typed Datasets is much more handy.

Your Title