Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why would @@FETCH_STATUS return -2
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2000
Miscellaneous
Thread ID:
01094578
Message ID:
01094607
Views:
1715
It referes to changes (deletion/updates) to the underlying table not the cursor.

>In this case the cursor is not updated in any of the sub procedures.
>
>>From DECLARE CURSOR in BOL:
>>
>>"If a row is deleted, an attempt to fetch the row returns an @@FETCH_STATUS of -2. Updates of key values from outside the cursor resemble a delete of the old row followed by an insert of the new row. The row with the new values is not visible, and attempts to fetch the row with the old values return an @@FETCH_STATUS of -2."
>>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform