INF: Using ESQL in a Threaded Application

Last reviewed: April 16, 1997
Article ID: Q151598
The information in this article applies to:
  • Microsoft Embedded SQL for C PTK, versions 4.22 and 6.5

SUMMARY

Embedded SQL Server for C is not thread-safe. If you are using ESQL in a threaded application, you should only use ESQL calls from a single thread of execution, and it is best if you use the main thread.

If you place the ESQL calls in a thread other than the main thread, the thread can only be started once. The thread must then remain available for all subsequent ESQL needs. To clarify, if you place the ESQL calls in a thread and then start and stop that thread multiple times to accomplish the database tasks, you may experience unexpected behavior. To implement a thread that handles all ESQL activity, you should set up the thread with an event-triggering mechanism.

This applies to Embedded SQL versions 4.22 and 6.5.


Additional query words:
Keywords : kbprg SSvrESQL_C
Version : 4.22 6.5
Platform : 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 16, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.