BUG: You may receive an error message when you try to use SQL Server Management Studio to update a row of a table in SQL Server 2005

Article translations Article translations
Article ID: 925719 - View products that this article applies to.
Expand all | Collapse all

SYMPTOMS

Consider the following scenario. You try to use SQL Server Management Studio to update a table in Microsoft SQL Server 2005. In Object Explorer, you right-click the name of the table, and then you click Open Table. You update a row of the table. In this scenario, you may receive one of the following error messages unexpectedly in the Microsoft SQL Server Management Studio dialog box:
Error message 1
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.
Note If you click Yes in this error message dialog box, the row is updated correctly.
Error message 2
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).
Note If you receive this message dialog box, you cannot update the row.

This issue occurs if the following conditions are true:
  • 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.
Note This issue also occurs when you try to use Table Designer in Microsoft Visual Studio 2005 to update a table that is in a SQL Server 2005 database.

CAUSE

This issue occurs because SQL Server Management Studio generates an incorrect SQL statement for the update operation. When the table does not contain a primary key, the values of all columns are used to identify the row to update. When SQL Server Management Studio constructs this statement, the incorrect comparison operator (=) is used to compare columns of the text, ntext, or image data types.

WORKAROUND

To work around this issue, create a new query window in SQL Server Management Studio. Then, run a SQL UPDATE statement to update the row in the table.

Note If you receive the first error message that is mentioned in the "Symptoms" section, you can click Yes to update the row.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.

Properties

Article ID: 925719 - Last Review: November 20, 2007 - Revision: 1.2
APPLIES TO
  • Microsoft SQL Server 2005 Standard Edition
  • Microsoft SQL Server 2005 Enterprise Edition
  • Microsoft SQL Server 2005 Developer Edition
  • Microsoft SQL Server 2005 Express Edition with Advanced Services
  • Microsoft SQL Server 2005 Workgroup Edition
  • Microsoft SQL Server 2005 Standard X64 Edition
  • Microsoft SQL Server 2005 Standard Edition for Itanium-based Systems
  • Microsoft SQL Server 2005 Enterprise X64 Edition
  • Microsoft SQL Server 2005 Enterprise Edition for Itanium-based Systems
  • Microsoft Visual Studio 2005 Standard Edition
  • Microsoft Visual Studio 2005 Professional Edition
  • Microsoft Visual Studio 2005 Team Edition for Software Architects
  • Microsoft Visual Studio 2005 Team Edition for Software Developers
  • Microsoft Visual Studio 2005 Team Edition for Software Testers
Keywords: 
kbexpertiseadvanced kbtshoot kbsql2005tool kbbug KB925719

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com