Powered by Blogger.

Friday, January 21, 2011

Tag: , ,

MS Sql Server 2008 error: "Saving changes is not permitted"

[UPDATE: this blog was moved to a new one]

Hi everyone,

The Problem

I'm kinda used to work with MySql, but for a new project MS Sql Server was required. Actually, I'm using R2 (express) version.

After creating a table and realizing that I had made a mistake, I opened the table design view again and made some changes. But what a surprise when after clicking Save button an error message was displayed:

"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."

Couldn't believe that I need to drop and re-create a table every time I need to make a change in the table definition. MySql doesn't work like that, so I'm sure there's a way to avoid this in MS Sql Server also, otherwise, it has no sense for me.

The Solution

After dropping 2 tables and re-created them I thought that I couldn't be doing that the whole project, so after reading carefully the error message, I thought about the last sentence: the option Prevent saving changes that require the table to be re-created.

I started to look in the options, and found one that says exactly the same as this last sentence of the error message.

Open Sql Server Management Studio and go to Tools-> Options -> Designers -> Table and Database Designers -> Uncheck Prevent saving changes that require table re-creation

That solved the problem. So now you are able to make changes in your table definition without having to drop it any time you want to make a change.

As ever, please feel free to leave any comments, suggestions or questions.

Thanks for reading!

About Anonymous

Hi, this is Nereo. I've spent my first professional years as .Net Software Engineer, and then moved more into Agile Methodologies. Anyway, I keep playing with all the new technologies that appear, and specially love Hybrid Apps!

3 comentarios:

  1. Excellent, thanks for you explication, I did have this problem...is fixed now for you post., sorry I'm from Venezuela, and speack spanish, don't speack english...GRACIAS!.

  2. Thanks Walter, I am from Spain, so don't worry. It is nice to have feedback from readers and to know that what is written is helpful. Please let me know if there is something special that you would like to read and I will try to create a new post about it. Thanks!


Note: Only a member of this blog may post a comment.