BUG: Error 602 While Fetching from a Cursor Defined on a ViewLast reviewed: April 22, 1997Article ID: Q165130 |
The information in this article applies to:
SYMPTOMSIf you fetch from a cursor defined on a view owned by a user other than the owner of the underlying base table, and there are identical object names for the view and the table, you will receive the following error message, and the client connection will be terminated:
Error 602, Severity: 21, State 3 Could not find row in Sysindexes for dbid '4', object '1232007420',index '-1'. Run DBCC CHECKTABLE on Sysindexes.For example, a view called "authors" created by user "Bill" in the pubs database defined on the underlying "dbo" owned "authors" table will give error 602 when Bill attempts to fetch from a cursor on this view.
CAUSEThe object ID in the error 602 message corresponds to the view object. SQL Server looks for the table object owned by its owner, when it should in fact be looking for the view.
WORKAROUNDUse qualifiers to reference the View name when declaring the cursor, as in the following example:
[[database.]owner.]view_name STATUSMicrosoft has confirmed this to be a problem in Microsoft SQL Server versions 6.0 and 6.5. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. |
Keywords : kbprg SSrvTran_SQL kbbug6.00 kbbug6.50
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |