The information in this article applies to:
SYMPTOMSWhen sharing a CDatabase object between multiple threads and using the SQL Server ODBC driver version 2.65.0240 or later, the following error occurs: SQLSTATE: S1000 CAUSEThis error occurs because of a timing conflict in the SQL Server ODBC driver. If two threads are in the process of calling SQLPrepare(), followed by a SQLExecute() call, this error may occur. RESOLUTIONPut CRecordset::Open() calls within a critical section to guarantee that only one thread is executing a SQL command on the connection at a given time. STATUSMicrosoft has confirmed this to be a bug in the Microsoft SQL Server driver. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available. MORE INFORMATIONFollowing is a code sample that can cause this error to occur: Sample code
Additional query words: VC++ kbDatabase kbMFC kbODBC kbSQLServ kbVC500 kbDSupport
Keywords : |
Last Reviewed: August 23, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |