BUG: Update View with Inner Join from Cursor Causes AVLast reviewed: March 6, 1998Article ID: Q170994 |
The information in this article applies to:
SYMPTOMSWhen updating a cursor, SQL Server generates an access violation (AV) and generates a stack trace and a dump file. From ISQL, users receive the following error:
DB-Library: Possible network error: Error in sending out-of-band data to SQL Server. Net-Library error 232: ConnectionWrite (GetOverLappedResult()).ODBC users receive the following error and the client application typically stops responding (including the development environment, such as Visual Basic):
[Microsoft][ODBC SQL Server Driver]Protocol error in TDS streamIn Visual Basic, the AV occurs when an Edit/Update is performed against a recordset of a VIEW that contains an ANSI style INNER JOIN, or when an equi- join to a SQL Server cursor is opened and an attempt is made to update that cursor. The recordset's cursor type (KEYSET, DYNAMIC, or FORWARD_ONLY) has no effect on the failure. That is, it fails no matter what cursor type is used. This problem does not occur with a STATIC cursor because a STATIC cursor is read-only, and the AV occurs during the attempt to update.
WORKAROUNDTo work around this problem, create the view using Transact-SQL style outer joins (for example, *= or =*). For example, use the following statements to create the view:
CREATE VIEW view_TEST AS select authors.* from authors, authors_useraccess where authors.au_id *= authors_useraccess.au_id and user = authors_useraccess.usercode GO STATUSMicrosoft has confirmed this to be a problem in SQL Server version 6.5. A supported fix is now available, but has not been fully regression- tested and should be applied only to systems experiencing this specific problem. Unless you are severely impacted by this specific problem, Microsoft recommends that you wait for the next Service Pack that contains this fix. Contact Microsoft Technical Support for more information.
|
Additional query words:
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |