INF: DB-Library Reentrancy and User-Defined Error Handlers

Last reviewed: April 3, 1997
Article ID: Q105749

The information in this article applies to:

  - Microsoft SQL Server Programmer's Toolkit, version 4.2

SUMMARY

Page 45 of the Microsoft SQL Server Programmer's Reference for C states:

   Protect error and message handling functions installed by dberrhandle
   and dbmsghandle. These are global to the entire DB-Library application,
   and should therefore be protected with a separate synchronization object
   to avoid colliding with the protection around certain DB-Library calls.

MORE INFORMATION

It is only necessary to serialize access within the error and message handlers if non-thread local data or resources are accessed during error or message handling.

If the error and message handlers are written to be fully reentrant, there is no need to protect these functions with synchronization objects.


Additional query words: 4.20 DB-Library dblib multiple re-entrancy
dblib
Keywords : kbprg SSrvDB_Lib SSrvProg
Version : 4.2
Platform : OS/2 Windows


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 3, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.