Article ID: 233190 - Last Review: March 14, 2006 - Revision: 2.1

FIX: Access Violation When Using UNIONs in Transact-SQL Cursors

This article was previously published under Q233190
BUG #: 54345 (SQLBUG_70)
Expand all | Collapse all

SYMPTOMS

If a UNION appears as a subquery or derived table and the UNION contains parameters or local variables, the connection will get an access violation (AV). You will receive an error message similar to the following:
ODBC: Msg 0, Level 19, State 1
SqlDumpExceptionHandler: Process 7 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.

Connection Broken

WORKAROUND

To work around this problem, try either of the following:
  • Do not use a UNION as a derived table.

    -or-
  • If you do use a UNION, make sure it does not contain parameters or local variables.

STATUS

Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 1 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
232570  (http://support.microsoft.com/kb/232570/ ) INF: How to Obtain Service Pack 1 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0
For more information, contact your primary support provider.

APPLIES TO
  • Microsoft SQL Server 7.0 Standard Edition
Keywords: 
kbbug kbfix KB233190
 

Article Translations

 

Related Support Centers