DB_E_CANCELLED Causes Access Violation in ADO (241544)
The information in this article applies to:
- Microsoft Data Access Components 2.1 SP2
- Microsoft Data Access Components 2.5 SP3
This article was previously published under Q241544 SYMPTOMS
An access violation occurs in ActiveX Data Objects (ADO) if connection.Execute or command.Execute returns DB_E_CANCELLED.
This problem occurs primarily under conditions where there is a transaction or command time out on a synchronous connection and the driver returns a SQLState of S1008 "Operation cancelled," which is normally reserved for asynchronous activities. Open Database Connectivity (ODBC) error S1008 is mapped by the ODBC provider to DB_E_CANCELLED.
In conjunction with the access violation, errors similar to the following occur in an ODBC trace file:
[S1008] [IBM][CLI Driver][DB2/6000] SQL0952N Processing was cancelled due to an interrupt. SQLSTATE=57014 (-952)
The error is not readily reproducible, and has been experienced only with IBM's DB2 ODBC driver. The Microsoft ODBC drivers do not return S1008 on synchronous function calls, because synchronous calls cannot normally be cancelled.
CAUSE
Internal to ADO, certain context variables related to cached error information, including interface pointers, are not properly initialized. Later, because the interface variable is not NULL, Release() is called on the interface pointer but the address it points to is completely invalid.
RESOLUTIONA supported hotfix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Microsoft Data Access Components service pack that contains this hotfix. To resolve this problem immediately, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site: Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.
The English version of this hotfix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
Date Time Version Size File name
----------------------------------------------------
3-Sep-1999 2.12.4503 330KB Msado15.dll
MDAC 2.5 SP3
Date Time Version Size File name
-----------------------------------------------------
23-Mar-2004 01:59 2.53.6302.0 487,424 Msado15.dll
22-Mar-2004 22:08 3.520.6302.0 212,992 Odbc32.dll
28-Oct-2003 21:44 3.70.11.46 24,848 Odbcbcp.dll
22-Mar-2004 17:58 3.520.6302.0 102,672 Odbccp32.dll
28-Oct-2003 21:44 3.70.11.46 524,560 Sqlsrv32.dll
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
Modification Type: | Minor | Last Reviewed: | 10/7/2005 |
---|
Keywords: | kbHotfixServer kbQFE kb3rdparty kbbug kbDatabase kbDB2 kbDriver kbfix kbMDAC210SP2fix kbQFE KB241544 kbAudDeveloper |
---|
|