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..
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.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.