Error were encountered during the save process. Some database objects were not saved

Have you ever faced a situation where you wanted to modify your existing table and was bugged with following error popup.

Error were encountered during the save process. Some database objects were not saved.

  Error were encountered during the save process. Some database objects were not saved_第1张图片

This is because by default saving changes to the table that requires table re-creation is disabled. To fixed this issue we need to enable the option to allow save on table re-creation. Below steps explain the same.

Step 1: Open the SQL ServerManagement Studio.(Ctrl + R -> SSMS)

Step 2:  Click on the Tools tab and click on Options...link.

Error were encountered during the save process. Some database objects were not saved_第2张图片

Step 3: This will open a popup window.  

Error were encountered during the save process. Some database objects were not saved_第3张图片

Step 4: From the left pane expand the Designers node.Table Options screen will be displayed in the right part of window.

  

Error were encountered during the save process. Some database objects were not saved_第4张图片

Step 5: Check the last option under Table Options section.

  

Error were encountered during the save process. Some database objects were not saved_第5张图片



Click the OK button and save the changes. This will fix your issue.

 

原因二:

要添加外键的表中的部分数据的id,在主表中不存在。添加关系之前要删除到这些对应不上的数据。

你可能感兴趣的:(database)