Typed DataSet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How come a Typed Dataset has a name(DataSet1) and a datasetname(DataSet)? I only seem to use the the name and not the datasetname.
 
The name is the one used by the designer. But the DataSetName is the one that defines the data source. For example if you have an Access Database whose structure you used to define your typed dataset and it is called Tracking with a table called Customers and a table called Orders, when you create your typed dataset you will probably have the DataSetName = "Tracking" with the typed tables CustomersTable and OrdersTable... i believe, i might be wrong..

iulia
 
Hi Michael,
Thanks for posting in community.

From your description, you would like to know why you use DataSet1 instead
of DataSetName to manipulate the dataset.

Let's take the following line for example:
//-=-=-=-=-=-=-=-=Code=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
DataSet DataSet1 = new DataSet("MyDataSetName");
Console.WriteLine(myDataSet.DataSetName);
//-=-=-=-=-=-=-=-=End=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
From the code above, we can see that the DataSet1 is an object of dataset,
and MyDataSetName is just a name for this dataset as you see in IDE. We
control the dataset through its instance rather than its name. DataSetName
is just a property for this dataset instance.
Hope this helps.

Rhett Gong[MS]
Microsoft Online Partner Support

This posting is provided "AS IS" with no warranties, and confers no rights.
Please reply to newsgroups only. Thanks.
 
Back
Top