FIX: Non-Serialized Execution of dbcursoropen() Hangs Client
  
PSS ID Number: Q105750
Article last modified on 01-24-1995
 
4.20 | 4.20
 
OS/2 | WINDOWS
 

----------------------------------------------------------------------
The information in this article applies to:
 
 - Microsoft SQL Server Programmer's Toolkit, version 4.2
----------------------------------------------------------------------
 
BUG# 9530 (4.20.00)
 
SYMPTOMS
========
 
When calling dbcursoropen() from multiple threads of execution within a
DB-Library program, the client application appears to hang. If SQL
Server is started with -T4032, repeated 'use database' commands will be
seen to be submitted from a single client connection.
 
CAUSE
=====
 
The dbcursoropen() function is not fully re-entrant. A small window of
opportunity exists for problems to arise when multiple threads of the
same process execute dbcursoropen() simultaneously.
 
WORKAROUND
==========
 
Access to the following functions should be serialized with a single
synchronization object:
 
   dbcursoropen()
   dbopen()
   dbuse()
   dbmsghandle()
   dberrhandle()
 
STATUS
======
 
Microsoft has confirmed this to be a problem in DB-Library version 4.20.00.
This problem was corrected in DB-Library version 4.21.00. For more
information, contact your primary support provider.
 
Additional reference words: 4.20.00 DB-Lib cursor cursors multi threaded
KBCategory: kbprg
KBSubCategory: SSrvDB_Lib SSrvProg
 
=============================================================================
 
Copyright Microsoft Corporation 1995.
