This may be a newbie question.

I used to just define (VB.Net for example):

dim dt as new DataTable
dataAdp.fill(dt)

But in VS.Net,
You can also right click the SQLDataAdapter1 component and click
"Generating Dataset...", after specify a name, the new xsd file will be
created as well as a correspond vb file. The VB file basically created
another class inherit DataSet class.

But in the vb code, it seems still need to do:

dataApt.fill(AutoGeneratedDataset, "SameNameOfTheTableWhenGenerating")

What's the benefit to use this function of VS.Net? I know one is you can
use the visual tool to do data binding after you have generated dataset
placed on the form designer.... Others?

Re: What's the benefit of using VS.Net's "Generating Dataset..."? by Scott

Scott
Wed May 12 14:05:30 CDT 2004

Generating a DataSet produces a typed DataSet.

A typed DataSet derives from the DataSet class and inherits all the
methods, events, and properties of a DataSet. In addition, a typed
DataSet provides strongly typed methods, events, and properties.

Something written like:

ds.Tables["Employees"].Rows[0]["Employee_ID"];

you culd write as:

ds.Employees.Rows[0].Employee_ID;

Which is a bit more readable and less error prone.
You'll also have intellisense in the IDE to complete to help.

HTH,

--
Scott
http://www.OdeToCode.com


On Wed, 12 May 2004 14:47:54 -0400, "@(nospam)hotmail.com"
<""nbdy9\"@(nospam)hotmail.com"> wrote:

>This may be a newbie question.
>
>I used to just define (VB.Net for example):
>
>dim dt as new DataTable
>dataAdp.fill(dt)
>
>But in VS.Net,
>You can also right click the SQLDataAdapter1 component and click
>"Generating Dataset...", after specify a name, the new xsd file will be
>created as well as a correspond vb file. The VB file basically created
>another class inherit DataSet class.
>
>But in the vb code, it seems still need to do:
>
>dataApt.fill(AutoGeneratedDataset, "SameNameOfTheTableWhenGenerating")
>
>What's the benefit to use this function of VS.Net? I know one is you can
>use the visual tool to do data binding after you have generated dataset
>placed on the form designer.... Others?