Microsoft KB Archive/238637

From BetaArchive Wiki
Knowledge Base


FIX: Update on View Based Cursor to Multiple Rows in Fetch Buffer Fails with 1203 Msg.

Article ID: 238637

Article Last Modified on 3/14/2006



APPLIES TO

  • Microsoft SQL Server 7.0 Standard Edition



This article was previously published under Q238637

BUG #: 56218 (SQLBUG_70)

SYMPTOMS

An update to all rows in the current fetch buffer (through sp_cursor), with a cursor based on a view, may fail with the following error:

Process 7 unlocking unowned resource: TAB: 5:982827855 []
spid7 Error: 1203, Severity: 20, State: 1
spid7 Process ID 7 attempting to unlock unowned resource TAB: 5:982827855 []..

This problem is specific to the use of extended cursor procedures since ANSI T-SQL only supports an update of a single row WHERE CURRENT OF <cursor>. An ODBC application might encounter this error when updating all rows in the fetch buffer through a SQLSetPos() API call.

WORKAROUND

Here are two ways to work around this behavior:

  • Use only one row in the fetch buffer.


-or-

  • Update the cursor against the base table.


STATUS

Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 2 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

254561 INF: How to Obtain Service Pack 2 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0


For more information, contact your primary support provider.

Keywords: kbbug kbfix KB238637