Microsoft KB Archive/250467

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Knowledge Base


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

Article ID: 250467

Article Last Modified on 10/3/2003



APPLIES TO

  • Microsoft SQL Server 6.5 Standard Edition



This article was previously published under Q250467

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 6.5.

Keywords: kbbug kbpending KB250467