BUG: Calling dberrhandle in Error Handler Causes RecursionLast reviewed: April 29, 1997Article ID: Q113527 |
The information in this article applies to:
SYMPTOMSAfter receiving an error fatal to a dbprocess, such as a 10025 "Write to SQL Server Failed," a continual stream of 10005 "DBPROCESS is dead or not enabled" errors is received by the error handler.
CAUSECalling dberrhandle(NULL) inside of the DB-Library (DB-Lib) error handler, when it is called due to a dbprocess killing error, like 10025 or 10005, will cause the error handler to be called again with a 10005 error.
WORKAROUNDApplications should call dberrhandle() within their error handlers only if the following condition is true:
dbproc != NULL && !DBDEAD( dbproc )This behavior does not occur in versions of DB-Library prior to version 4.21.
STATUSMicrosoft has confirmed this to be a problem in DB-Library version 4.21. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATIONThis problem will generally cause the error handler to receive one 10025 error, followed by an endless stream of 10005 errors. For example:
int err_handler( ... ) { dberrhandle( NULL ); // .. process error dberrhandle( err_handler ); }On OS/2, the error handler is not called endlessly, but the DB-Library call that caused the initial error to be generated is never returned from.
|
Additional query words: dbgetuserdata handling handle msg dblib
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |