Microsoft KB Archive/171367

From BetaArchive Wiki
Knowledge Base


Article ID: 171367

Article Last Modified on 10/3/2003



APPLIES TO

  • Microsoft SQL Server 6.5 Standard Edition



This article was previously published under Q171367

SYMPTOMS

BUG #: 16733 (Windows: 6.5)

An attempt to install a per process error or message handler may unexpectedly return NULL if you use a LOGINREC to install the handler.

CAUSE

WORKAROUND

To work around this problem, check the calls to dbprocerrhandle and dbprocerrhandle. If it returns NULL and does not meet the criteria described in the MORE INFORMATION section of this article, call dbfreelogin and reconstruct the LOGINREC.

MORE INFORMATION

The functions can correctly return NULL in the following situations:

  • The DBHANDLE passed to the function is NULL.
  • The DBHANDLE passed in is a LOGINREC, but the LOGINREC is invalid.
  • The DBHANDLE is a DBPROCESS and the process is dead (DBDEAD).
  • The DBHANDLE is a DBPROCESS and there is no prior handler installed. In this case, it returns the former handler just like the global callback handler installations.


STATUS

Microsoft has confirmed this to be a problem in Microsoft SQL Server version 6.5. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


Additional query words: Invalid Login Function

Keywords: kbbug kbprogramming KB171367