PRB: Dynamic Cursor Infinite Loop When a Non-Unique Clustered Index Key Is Updated to an Equal or Larger Value (280406)
The information in this article applies to:
- Microsoft SQL Server 7.0
- Microsoft SQL Server 2000 (all editions)
This article was previously published under Q280406 SYMPTOMS
A dynamic cursor goes into an infinite loop when a non-unique clustered index key is updated to a value greater than or equal to itself.
CAUSE
For a non-unique clustered index key update, if the new value is greater than or equal to the original value, the update actually deletes the original value and inserts the new value. This adds a new row, which is reflected into the dynamic cursor and causes the @@fetch_status to always return '0'.
WORKAROUND
Define the index as nonclustered instead of clustered.
Modification Type: | Major | Last Reviewed: | 10/16/2003 |
---|
Keywords: | kbprb KB280406 |
---|
|