Sunday 16 June 2013

@@fetch_status==-2

That cursor shouldn't need a check against -2 as it is a read-only cursor. But if you have a key-set 
driven cursor (SQL Server stored only the primary key, when fetching, SQL Server uses the PK to 
fetch the other columns, you might end up navigating to a row which has been deleted in the table. 
Hence @@FETCH_STATUS = -2.

No comments:

Post a Comment

Recent Post

Parallel Task in .Net 4.0