FIX: Update View with Inner Join from Cursor Causes AV (170994)
The information in this article applies to:
This article was previously published under Q170994 SYMPTOMS
When 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 stream
In 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.
WORKAROUND
To 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
STATUS
Microsoft has confirmed this to be a problem in SQL Server 6.5. This problem has been corrected in Service Pack 5a for Microsoft SQL Server 6.5.For more information, click the following article number to view the article in the Microsoft Knowledge Base: 197177 INF: How to Obtain SQL Server 6.5 Service Pack 5a For more information, contact your primary support provider.
Modification Type: | Major | Last Reviewed: | 3/14/2006 |
---|
Keywords: | kbBug kbfix kbusage KB170994 |
---|
|