FIX: 16933 Error on View Updated Through Server Cursor

Last reviewed: May 2, 1997
Article ID: Q149917

The information in this article applies to:
  • Microsoft SQL Server, version 6.0
BUG#: 13762 (6.00)

SYMPTOMS

Applications attempting to update a view through SQL Server server cursors will receive the following error even if the operation observes the SQL Server requirement that updates through views only update a single base table:

   Msg 16933, Level 16, State 2
   The cursor does not include the table being modified.

WORKAROUND

Open the cursor with a select against the base tables instead of the view. Alternatively, open a second connection and issue an SQL update command based on key values through the second connection.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft SQL Server version 6.00. This problem was corrected in SQL Server version 6.50.

MORE INFORMATION

There are two types of applications that encounter this problem with server cursors. Db-library applications can run into the problem if they have opened a server cursor and attempt a dbcursor() command with the CRS_UPDATE option. ODBC applications using the Microsoft SQL Server ODBC Driver can encounter this when they have a server cursor open and attempt a SQLSetPos() command with the SQL_UPDATE option.

Cursor scripts using UPDATE ... WHERE CURRENT OF cursor_name are not affected.

Note that the above error is valid if the update is attempting to update columns from more than one of the base tables referenced by the view. Users getting the above error should first determine if their update is exceeding this SQL Server requirement.


Additional query words: default
Keywords : kbbug6.00 kbprg SSrvProg
Version : 6.0
Platform : WINDOWS
Issue type : kberrmsg


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 2, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.