BUG: DECLARE Dynamic Cursor with ORDER BY Causes Access Violation

ID: Q239810


The information in this article applies to:
  • Microsoft SQL Server version 6.5

BUG #: 18041 (SQLBUG_65)

SYMPTOMS

A DECLARE cursor operation on a SELECT statement that uses an ORDER BY clause, causes an access violation (AV). This only occurs when the cursor type is dynamic (default type in SQL Server 6.5) and the ORDER BY clause references columns in a different order than specified in the SELECT clause. This is a thread-level, handled exception that only affects the current process.


WORKAROUND

This problem can be avoided if a different type of cursor is used. You can change the DECLARE statement to specify a SCROLL or INSENSITIVE cursor type.

Alternately, you can change the SELECT clause to match the order of the columns specified in the ORDER BY clause. The AV does not occur if the ORDER BY clause matches the column order in the SELECT list.


STATUS

Microsoft has confirmed this to be a problem in SQL Server version 6.5.

Additional query words: av abend spid die error dbprocess does not exist

Keywords : kbSQLServ650bug
Version : winnt:6.5
Platform : winnt
Issue type : kbbug


Last Reviewed: September 7, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.