Microsoft KB Archive/306096

= FIX: Infinite Loop Occurs in ESQL Application That Uses Keyset Cursor =

Article ID: 306096

Article Last Modified on 9/26/2005

-

APPLIES TO


 * Microsoft SQL Server 7.0 Standard Edition
 * Microsoft SQL Server 2000 Standard Edition

-



This article was previously published under Q306096



BUG #: 355216 (SHILOH_BUGS)

BUG #: 101723 (SQLBUG_70)

BUG #: 389 (MDAC_QFE)



SYMPTOMS
Applications built with Microsoft Embedded SQL for C (ESQL/C) may go into an infinite loop when a KEYSET cursor opens and another connection modifies the first row on the server before the row is fetched.



CAUSE
If a connection modifies a row in a KEYSET cursor, SQL Server generates error 601 and marks the row as missing in the keyset. Then, DBLIB sends a FTC_MISSING status to ESQL. ESQL should now ignore this row and fetch the next one; however, ESQL requests the first row in an infinite loop.



RESOLUTION
To resolve this problem, obtain the latest service pack for SQL Server 2000, the latest service pack for MDAC 2.6, or the hotfix referenced below. For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

290211 INF: How to Obtain the Latest SQL Server 2000 Service Pack

For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

300635 INFO: How to Obtain the Latest MDAC 2.6 Service Pack

Hotfix
NOTE: The following hotfix was created prior to Microsoft SQL Server 2000 Service Pack 2.

The English version of this fix should have the following file attributes or later:   Date         Version         Size            File name -  08/01/2001   2000.80.308.0   126,976 bytes   Sqlakw32.dll NOTE: Due to file dependencies, the most recent hotfix or feature that contains the preceding files may also contain additional files.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was first corrected in Microsoft SQL Server 2000 Service Pack 2 and MDAC 2.6 Service Pack 2.



MORE INFORMATION
You can easily identify this bug in SQL Profiler by the occurrence of a 601 exception error and an endless series of identical calls of &quot;sp_cursorfetch&quot; that follow the 601 exception.

Additional query words: hang sp_cursorfetch

Keywords: kbbug kbfix kbqfe kbmdac260sp2fix kbhotfixserver KB306096

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.