FIX: Transaction Rolls Back Automatically with Error 8144 on a Prepared Command (328908)
The information in this article applies to:
- Microsoft Data Access Components 2.7
- Microsoft SQL Server 2000 (all editions) 8.0
- Microsoft SQL Server 2000 (all editions) SP1
- Microsoft SQL Server 2000 (all editions) SP2
This article was previously published under Q328908 SYMPTOMS When you use an OLE DB application, or an ActiveX Data
Objects (ADO) application, and you execute a stored procedure against SQL
Server 2000, Error 8144 occurs and Microsoft SQL OLE DB Provider (SQLOLEDB)
rolls back the transaction automatically without notifying the application.
Error 8144 from SQL Server appears in the SQL Profiler Trace log as follows:
Error: 8144, Severity: 16, State: 2 This
error occurs when the following conditions are true:
- You use Microsoft SQL OLE DB Provider
(SQLOLEDB).
- You execute the stored procedure in the scope of a
transaction more than one time.
- You do not set the parameters manually (for example, you
populate the parameter collection by using the Parameters.Refresh method in ADO).
- You perform a deferred prepare on the command (for example,
command.Properties("Defer Prepare") = TRUE which is the default option and
command.Prepared=TRUE).
CAUSE This occurs because of a bug in Microsoft SQL OLE DB
provider. In the case of a deferred prepare, SQLOLEDB sends incorrect
parameters to Microsoft SQL Server 2000 which causes SQL Server to throw error
8144. 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 fix should have the following file attributes or later.
Date Version Size File name
------------------------------------------------------------
11-Sep-2002 2000.81.9031.3 471,040 bytes Sqloledb.dll
WORKAROUND To work around this problem, use one of the following methods:
- Manually set the parameter information.
- Do not prepare the command on which the stored procedure is
executed.
- Set the Defer Prepare property to False on the command object (for example: command.Properties("Defer
Prepare") = False).
STATUSMicrosoft has confirmed that this is a bug in the Microsoft
products that are listed at the beginning of this article.
Modification Type: | Minor | Last Reviewed: | 10/11/2005 |
---|
Keywords: | kbHotfixServer kbQFE kbbug kbfix kbProvider KB328908 kbAudDeveloper |
---|
|