BUG: Opening Cursor When Using ISNULL() Function May Cause An Access Violation

ID: Q250467


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

BUG #: 18244 (SQLBUG_65)

SYMPTOMS

An access violation (AV) is possible when a cursor opened on a SELECT statement satisfies the following conditions:

  • Contains the ISNULL() function.


  • Joins at least two tables.


  • The cursor is not declared as keyset or insensitive.


  • The tables do not have unique indexes.



WORKAROUND

To work around this use these steps:

  1. Switch the tables in the FROM clause, such that the first table is the one being referenced by ISNULL(). If there are more than two tables where the ISNULL() function is used, then this option may not work.


  2. Create a unique clustered index on the table(s) referenced by ISNULL().


  3. Change the cursor to keyset or insensitive.


  4. Avoid the use of the ISNULL() function.


  5. Create unique indexes on the tables involved.



STATUS

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

Additional query words:

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


Last Reviewed: January 26, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.