part 2 - I don't understand how Visual Studio does DataSet addition

  • Thread starter Thread starter Unemployed Programmer
  • Start date Start date
U

Unemployed Programmer

Following on my last post, With the SqlDataAdapter, I clicked on the link
"Generate Dataset ...", and added a DataSet named "NEWDATASET". I then
checked the code listing, and took a look at where this string would come up.
(NOTE: "DBtest" is the name of the project. My comments are with ***.

In the form class:

private DBtest.NEWDATASET newdataset1;

*** I don't see a nested class named NEWDATASET anywhere. How is there now a
type called this?

In the form CTOR:

this.newdataset1 = new DBtest.NEWDATASET();

*** OK, if I assume that there is a nested type named NEWDATASET, then this
makes sense

In InitializeComponent():

this.newdataset1.DataSetName = "NEWDATASET";

*** OK, DataSetName is a property of the DataSet class. No problem here.

---------------------------------------

So it looks like the essential problem is that NEWDATASET is being used as a
nested type, but it isn't being declared anywhere! What am I missign here?

Thanks again
 
Hi,

Open your solution explorer and click the icon "show all files" in top.
Than look at the files. As I understood your problem well, than there you
will see the class as newdataset.cs

I hope this helps,

Cor
 
Back
Top