none
Name of DataSet vs DataSetName RRS feed

  • Question

  • In the DataSet control, there's Name and DataSetName.

    When I use from code, which one should I use?

    Monday, September 23, 2019 8:54 PM

Answers

  • DataSetName is required when writing out data to XML, otherwise for typical read, write etc operations there is no need for it but can't hurt to have it set.

    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    • Marked as answer by Jeff0803 Tuesday, September 24, 2019 1:17 PM
    Monday, September 23, 2019 9:09 PM
    Moderator
  • Hi Jeff0803,

    Thank you for posting here.

    As usual, we need to use DataSetName in code. The following link is a example that could use DataSetName.

    DataSet.DataSetName Property

    Hope this could help you.

    Best Regards,

    Jack


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Jeff0803 Tuesday, September 24, 2019 1:20 PM
    Tuesday, September 24, 2019 1:56 AM
    Moderator
  • Hi Jeff0803,

    Thank you for posting here.

    As usual, we need to use DataSetName in code. The following link is a example that could use DataSetName.

    DataSet.DataSetName Property

    Hope this could help you.

    Best Regards,

    Jack


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    I would say you don't need DataSetName for working with data from a database to a DataSet e.g.

    https://github.com/karenpayneoregon/MasterDetailsSqlServerNorthWind/blob/master/DataOperations/Operations.cs#L85


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    • Marked as answer by Jeff0803 Tuesday, September 24, 2019 1:22 PM
    Tuesday, September 24, 2019 2:05 AM
    Moderator

All replies

  • DataSetName is required when writing out data to XML, otherwise for typical read, write etc operations there is no need for it but can't hurt to have it set.

    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    • Marked as answer by Jeff0803 Tuesday, September 24, 2019 1:17 PM
    Monday, September 23, 2019 9:09 PM
    Moderator
  • Hi Jeff0803,

    Thank you for posting here.

    As usual, we need to use DataSetName in code. The following link is a example that could use DataSetName.

    DataSet.DataSetName Property

    Hope this could help you.

    Best Regards,

    Jack


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Jeff0803 Tuesday, September 24, 2019 1:20 PM
    Tuesday, September 24, 2019 1:56 AM
    Moderator
  • Hi Jeff0803,

    Thank you for posting here.

    As usual, we need to use DataSetName in code. The following link is a example that could use DataSetName.

    DataSet.DataSetName Property

    Hope this could help you.

    Best Regards,

    Jack


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    I would say you don't need DataSetName for working with data from a database to a DataSet e.g.

    https://github.com/karenpayneoregon/MasterDetailsSqlServerNorthWind/blob/master/DataOperations/Operations.cs#L85


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    • Marked as answer by Jeff0803 Tuesday, September 24, 2019 1:22 PM
    Tuesday, September 24, 2019 2:05 AM
    Moderator
  • Then what is the purpose of the DataSet.Name?

    • Marked as answer by Jeff0803 Tuesday, September 24, 2019 1:22 PM
    • Unmarked as answer by Jeff0803 Tuesday, September 24, 2019 1:22 PM
    Tuesday, September 24, 2019 1:20 PM