Update DataSet structure in Visual Studio to match new SQL Database Structure

后端 未结 2 1156
逝去的感伤
逝去的感伤 2020-12-25 11:28

After making some changes to my SQL database structure (using scripts in SQL Server Management Studio), how can I update my DataSet.xsd file in Visual Studio to match the ne

相关标签:
2条回答
  • 2020-12-25 12:17
    • Open the server explorer and browse through the Database to the table to be added
    • Check the table is update
    • Drag the table to your Dataset
    0 讨论(0)
  • 2020-12-25 12:24

    From the MSDN Forums:

    If you right-click the TableAdapter in the Dataset Designer and click 'Configure' the TableAdapter Configuration Wizard opens where you can reconfigure the main query that defines the schema of your table. This should leave the additional TableAdapter queries (the additional methods) that were added after initial configuration.

    Of course the additional methods will also need to be reconfigured if they reference a column that has been removed from the table on the database, or if any of the column definitions change (for example, if the data type is changed or modified). So if an aditional column was added to the table and it allows Null values the existing methods should still work - just depends on the scope of change to the schema of the table in the database.

    0 讨论(0)
提交回复
热议问题