Dataset

When we use typed datase and untped dataset?
What is the difference between them?
let me know
thank you
[120 byte] By [j.Sridhar] at [2007-11-19 11:28:33]
# 1 Re: Dataset
sridhar,

This article is good one

http://www.15seconds.com/issue/031223.htm
Srinivasap at 2007-11-10 3:30:42 >
# 2 Re: Dataset
Typed DataSet are DataSets which are specialized for a certain database schema.

A Typed DataSet is always derived from the DataSet class, thus a Typed DataSet has all the members and method of an Untyped DataSet. For example: You can access the Tables and Relations properties, and the Rows property for each table.

However, you will be able to access the tables and columns by their names.
For example:
DataRow dr = ds.Tables["MyTable"].Rows(5);
MessageBox.Show(dr["Name"]);

instead of:
MessageBox.Show(((MyTableRow)ds.MyTable.Rows(5)).Name);

You get the benefits of the intellisense, and you get Type Safety features.

Using Strongly Typed objects is always a good OOP practice.

The Typed DataSet is auto generated by the .NET IDE (as Srinivasap article described), using an XML schema.

Hope this helps.
jhammer at 2007-11-10 3:31:53 >