Telerik blogs

Tonight I ran into the following error message when using a freshly installed version of SQL Server 2008 in a new project.

Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can't be re-created or enabled the option Prevent saving changes that require the table to be re-created.

The error appeared after I created a new table, set up it's primary key column, clicked save, and then tried to modify and re-save the table again. The reason this error dialogue is being displayed is because whenever you add a new column, drop a column, change a columns nullability, or make any of several other changes to a table in the designer, that table is dropped and recreated. Well, little did I know that in SQL Server 2008 there is a property that is enabled by default that prevents you from being able to re-create tables in the designer.

To disable this feature in SQL Server 2008 Management Studio, navigate to Tools | Options | Designers | Table and Database Designers and uncheck the Prevent saving changes that require table re-creation checkbox.

sqlserver2008 

If your database designer is Visual Studio, navigate to Tools |Options | Database Tools | Table and Database Designers | Table and Database Options and uncheck the Prevent saving changes that require table re-creation checkbox.

visualstudio2008 

Enjoy!


kick it on DotNetKicks.com

Comments

Comments are disabled in preview mode.