BUG: Update of Newly Inserted Row Causes DB_E_ERRORSOCCURRED (294160)
The information in this article applies to:
- Microsoft SQL Server 2000 (all editions)
- Microsoft SQL Server, Standard Edition 7.0
- Microsoft Data Access Components 2.5
- Microsoft Data Access Components 2.5 SP1
- Microsoft Data Access Components 2.6
This article was previously published under Q294160 SYMPTOMS
On updating a row which has been newly inserted into a table, whether through an OLEDB rowset or an ActiveX Data Objects (ADO) recordset, the following error may occur:
(0x80040e21, DB_E_ERRORSOCCURRED) Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
This error occurs when the following conditions are met:
- There is a connection to SQL Server through the OLE DB Provider for ODBC drivers (MSDASQL).
- The recordset is created by selecting from a SQL Server database table.
- The recordset uses server-side cursors.
- One of the columns in the recordset is the primary key for the table.
- There is an insert trigger on the table which inserts rows into some database object.
- The AddNew and Update methods are used to add a new row to the table.
- Update is called again to update a row before the recordset has been scrolled using FetchNext, FetchFirst, and so on.
RESOLUTION
To prevent this error from occurring, do any of the following:
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
| Modification Type: | Major | Last Reviewed: | 12/5/2003 |
|---|
| Keywords: | kbbug KB294160 |
|---|
|