SQL Server 2008: FIXED “Data has changed since the Results pane was last retrieved”

by Josh Highland on February 3, 2010

Screen shot 2010 02 03 at 12.16.11 AM SQL Server 2008: FIXED Data has changed since the Results pane was last retrieved

Today I was trying to edit the value in a table cell through the query browser in Microsoft SQL Server Management Itudio and I kept getting the following error:

Data has changed since the Results pane was last retrieved. Do you want to save your changes now?
(Optimistic Concurrency Control Error)
Click Yes to commit your changes to database anyway.
Click No to discard your change and retrieve the current data for this row.
Click Cancel to continue editing.

occe SQL Server 2008: FIXED Data has changed since the Results pane was last retrieved

I would click “Yes”, and get another error:

No row was updated.
The data in row X was not committed.
Error Source: Microsoft.VisualStudio.DataTools.
Error Message: The row value(s) updated or deleted either do not make the row unique or they alter multiple rows(N rows).
Correct the errors and retry or press ESC to cancel the change(s).

I was killing myself trying to figure out what was wrong. I was the only person working on the database, so the data wasnt being changed behind my back.

After an hour on goolge I came across a Microsoft tech article for MS SQL 2005, http://support.microsoft.com/kb/925719

It stated the issue could occure from one of the following conditions:

  • The table contains one or more columns of the text or ntext data type.
  • The value of one of these columns contains the following characters:
  • Percent sign (%)
  • Underscore (_)
  • Left bracket ([)
  • The table does not contain a primary key.

I double checked the table I was working on and realized it didnt have a primary key. It must have gotten dropped in the data migration from MS SQL 2000 to MS SQL 2008. A simple right click, set primary key and my problem was fixed.

setPrimaryKey SQL Server 2008: FIXED Data has changed since the Results pane was last retrieved

Verify the primary keys! It’s a simple fix to a head breaker of a problem. I hope someone finds this and it fixes their issue.

  • digg SQL Server 2008: FIXED Data has changed since the Results pane was last retrieved
  • facebook SQL Server 2008: FIXED Data has changed since the Results pane was last retrieved
  • stumbleupon SQL Server 2008: FIXED Data has changed since the Results pane was last retrieved
  • twitter SQL Server 2008: FIXED Data has changed since the Results pane was last retrieved
  • delicious SQL Server 2008: FIXED Data has changed since the Results pane was last retrieved
  • reddit SQL Server 2008: FIXED Data has changed since the Results pane was last retrieved
  • friendfeed SQL Server 2008: FIXED Data has changed since the Results pane was last retrieved
  • posterous SQL Server 2008: FIXED Data has changed since the Results pane was last retrieved
  • tumblr SQL Server 2008: FIXED Data has changed since the Results pane was last retrieved

{ 2 comments… read them below or add one }

1 Rob June 22, 2010 at 2:05 pm

This is a good tip, but it doesn’t fix the issue of the special characters inside text fields. This bug still exists in SQL 2008, and it it EXTREMELY annoying.

2 andy November 5, 2011 at 5:57 am

Thanks! Someone else’s hour on Google is now my 2 mins.

Leave a Comment

Previous post:

Next post: