donderdag 10 december 2009

Prevent Saving Changes

I decided, from now on, i'll write my blog in English instead of in Dutch. So my world is expanded from the Netherlands to the whole world ;-)

Today, i had a strange error when I try to change a table in SQL Server 2008.


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.

I didn't ran into this error before. When I try to change a table by adding a primary key and saving it, a warning occurs. The reason is that when you save a table in SQL Server Management Studio requires the table be dropped and recreated behind the scenes (apparently always(?)).

This is by design and can be quickly fixed in Management Studio by unchecking a property. To fix this in Management Studio, go to Tools -> Options then go to the Designer Page and uncheck "Prevent saving changes that require table re-creation".

Why do I have go options menu? Why can’t I choose to accept the (possible) time to recreate the table?

Geen opmerkingen:

Een reactie posten