BUG: Error Handler Not Called by RAISERROR if NOCOUNT Set ON

ID: Q152135


The information in this article applies to:


SYMPTOMS

When executing a stored procedure that raises an error through RAISERROR, the error handler in the DB-Library application is not called if NOCOUNT is set ON within the stored procedure. The message handler is always called correctly, but the calling of the error handler depends on the NOCOUNT behavior.


WORKAROUND

Set NOCOUNT OFF before calling the RAISERROR in the stored procedure, and then set NOCOUNT back ON after the RAISERROR.


STATUS

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

Additional query words: dblib proc


Keywords          : kbbug6.50 kbbug4.21 kbbug6.00 
Version           : 4.21 6.0 6.5
Platform          : WINDOWS 
Issue type        : 

Last Reviewed: March 28, 1999