On a computer that is running Windows Vista, Windows Server 2008, Windows XP, or Windows Server 2003, an incorrect value is returned when an application queries the identity column value of a newly inserted row in SQL Server 2005 and in SQL Server 2000

Article translations Article translations
Article ID: 951937 - View products that this article applies to.
Support for Windows Vista Service Pack 1 (SP1) ends on July 12, 2011. To continue receiving security updates for Windows, make sure you're running Windows Vista with Service Pack 2 (SP2). For more information, refer to this Microsoft web page: Support is ending for some versions of Windows.
For Windows XP-based computers, the hotfix in Microsoft Knowledge Base article 951937 is replaced by the update in Microsoft Knowledge Base article 952287. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
952287 An application that uses the ADO interface may malfunction, or data loss may occur when the application connects to SQL Server in Windows Vista, in Windows XP, or in Windows Server 2008
Expand all | Collapse all

SYMPTOMS

Applications that use the ActiveX Data Objects (ADO) interface in the following scenario may experience functionality issues:
  • An application connects to Microsoft SQL Server 2005, to SQL Server 2005 Express Edition, to Microsoft SQL Server 2000, or to SQL Server Desktop Engine (also known as MSDE 2000).
  • The application uses the SET NOCOUNT ON statement for the connection.
  • The application inserts a row into a table that has an identity column by using a Microsoft ActiveX Data Objects (ADO) client-side cursor.

    Note This issue only occurs if the application uses a client-side cursor. If the application uses a server-side cursor, the application is not affected.
When the application queries the identity column value of the newly inserted row, the value "0" is returned incorrectly. This may cause an application to malfunction or even data loss. Whether a malfunction or data loss occurs depends on how the application handles this scenario.

This problem exists in the Microsoft Data Access Components (MDAC) components of the following Windows operating systems:
  • Windows Vista Service Pack 1
  • Windows XP Service Pack 2 with hotfix 940569
  • Windows XP Service Pack 3
  • Windows Server 2008
  • Windows Server 2003 Service Pack 1 with hotfix 940569
  • Windows Server 2003 Service Pack 2 with hotfix 940569
This problem also occurs after you install hotfix 940569 on a computer that has MDAC 2.8 Service Pack 1 installed.

To prevent this problem, install the hotfix that is described in this article.

RESOLUTION

To resolve this issue, install the hotfix that is described in the following Microsoft Knowledge Base article:
961451 FIX: You receive an incorrect value when you query the last-inserted identity value after you use a client-side cursor to insert data to a table that contains an identity column in an application that uses ActiveX Data Objects

Note The hotfix that was described in the "Resolution" section in the earlier version of this article is superseded by the hotfix that is described in 961451.

STATUS

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

MORE INFORMATION

Customers who use Microsoft Dynamics Retail Management System (RMS) Store Operations and Headquarters are affected by this issue when they use the Windows operating systems that are affected and supported. We recommend that you install this hotfix to prevent potentially invalid data or data loss.

For more information, click the following article number to view the article in the Microsoft Knowledge Base:
824684 Description of the standard terminology that is used to describe Microsoft software updates

Properties

Article ID: 951937 - Last Review: June 8, 2011 - Revision: 4.1
APPLIES TO
  • Windows Vista Service Pack 1
  • Windows Server 2008 Datacenter without Hyper-V
  • Windows Server 2008 Enterprise without Hyper-V
  • Windows Server 2008 for Itanium-Based Systems
  • Windows Server 2008 Standard without Hyper-V
  • Windows Server 2008 Datacenter
  • Windows Server 2008 Enterprise
  • Windows Server 2008 Standard
  • Microsoft Windows XP Service Pack 3
  • Microsoft Windows Server 2003 Service Pack 2
  • Microsoft Windows Server 2003 Service Pack 1
Keywords: 
kbautohotfix kbexpertiseadvanced kbfix kbqfe kbhotfixserver KB951937

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