INF: Proper Use for DB-Library Err Handler Return Code INT_EXIT

ID: Q180779

The information in this article applies to:

SUMMARY

This article describes how the INT_EXIT return code in the DB-Library error handler may cause unexpected application behavior.

For complete documentation on INT_EXIT, see the SQL Server Books Online.

MORE INFORMATION

INT_EXIT stops execution of the current process by invoking ExitProcess(1). This can lead to unexpected application behavior.

NOTE: You should NEVER use a return code of INT_EXIT when building extended stored procedures or COM-based components, especially in-process servers, ISAPI DLLs, or in other extensible architectures.

If you return INT_EXIT from your DB-Library message handler while in an extended stored procedure, the ExitProcess will simply stop the SQL Server process. There will be no message in the SQL Server errorlog and it appears as if someone turned off the computer.

Additional query words: crash shutdown db-lib

Keywords          : SSrvProg 
Version           : WINNT:6.5
Platform          : winnt
Issue type        : kbinfo

Last Reviewed: February 11, 1998