INF: Using SQL Db-Lib Calls in Multithreaded ProgrammingLast reviewed: April 25, 1997Article ID: Q66472 |
The information in this article applies to:
SUMMARYThe DB-Library (DB-Lib) routines are basically non-reentrant; therefore, you are responsible for serializing the DB-Lib calls that access the named pipe connection in multithreaded applications you develop.
MORE INFORMATIONThis is true when more than one thread accesses a single dbprocess; it is necessary to serialize calls to the named pipe connection in an application where more than one thread accesses a single dbprocess. Also, if each thread accesses a different dbprocess, you are freed of serialization concerns except for operations that involve global variables. Error and message handling is maintained globally; therefore, you might want to block on a semaphore when an error or message occurs, so that you are not preempted by another thread. The dbprocess passed to the error/message handler will distinguish which thread is involved. Timeouts are also managed globally.
|
Additional query words: dblib
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |