Microsoft Knowledge Base Email Alertz

(249350) - The following error messages occur: Change canceled during notification, no columns changed (MDAC 2.1) -or- Run-time error '-2147217842(80040e4e) Operation was canceled (MDAC 2.5 and later) This problem occurs with the Jet Provider and does not occur...

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 249350 - Last Review: April 29, 2007 - Revision: 2.4

FIX: Error Messages "Change Canceled During Notification..." (MDAC 2.1) or "Operation Was Canceled" (MDAC 2.5)

This article was previously published under Q249350

On This Page

SYMPTOMS

The following error messages occur:
Change canceled during notification, no columns changed (MDAC 2.1)
-or-
Run-time error '-2147217842(80040e4e) Operation was canceled (MDAC 2.5 and later)
This problem occurs with the Jet Provider and does not occur with the SQL Server Provider. The problem also does not reproduce with client-side cursors.

The problem doesn't seem to be in the ADODC itself, because you can bind the controls directly to a Recordset object and click on a MoveNext command button to cause the problem.

RESOLUTION

The resolution is to issue a Recordset.Move 0 method in one of the events in the TextBox control.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. This bug was corrected in the latest service pack for Visual Studio 6.0.

For additional information about Visual Studio service packs, click the following article numbers to view the articles in the Microsoft Knowledge Base:
194022  (http://kbalertz.com/Feedback.aspx?kbNumber=194022/ ) INFO: Visual Studio 6.0 Service Packs, What, Where, Why
194295  (http://kbalertz.com/Feedback.aspx?kbNumber=194295/ ) How to tell that a Visual Studio service pack is installed
To download the latest Visual Studio service pack, visit the following Microsoft Web site:
http://msdn2.microsoft.com/en-us/vstudio/aa718359.aspx/ (http://msdn2.microsoft.com/en-us/vstudio/aa718359.aspx)

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a new project and add the ADO Data control and the DataGrid (OLE DB) control to the components.
  2. Add a TextBox, a DataGrid, a CommandButton, and an ADO Data control to the form.
  3. Set the connection string on the ADO Data control to use the JET 4.0 OLEDB provider and then choose the Northwind database.
  4. Add the following code to the project:
        Dim rs As ADODB.Recordset
    Private Sub Form_Load()
    
        Set rs = New ADODB.Recordset
        rs.CursorLocation = adUseServer
        rs.ActiveConnection = Adodc1.ConnectionString
        rs.Properties("IRowsetIdentity") = True
        rs.Open "SELECT * FROM Customers", _
                , adOpenKeyset, adLockOptimistic, adCmdText
        Set Adodc1.Recordset = rs
        Set DataGrid1.DataSource = Adodc1
        Text1.DataField = "CompanyName"
        Set Text1.DataSource = Adodc1
    End Sub
    Private Sub Command1_Click()
    rs.MoveNext
    
    End Sub
    					
  5. Run the program.
  6. In the Grid, select an entire row about four lines down. Be sure to click on the Button column on the left so that you select the entire row.
  7. Edit the text in the TextBox (not in the Grid).
  8. In the Grid, select another entire row about four more lines down.
  9. Edit the text in the TextBox.
  10. Click on the Move Next button, and note that you get the error messages listed in the "Symptoms" section of this article.

APPLIES TO
  • Microsoft ActiveX Data Objects 2.1
  • Microsoft ActiveX Data Objects 2.1 Service Pack 1
  • Microsoft ActiveX Data Objects 2.1 Service Pack 2
  • Microsoft ActiveX Data Objects 2.5
  • Microsoft OLE DB Provider for Jet 3.51
  • Microsoft OLE DB Provider for Jet 4.0
  • Microsoft Visual Basic 6.0 Professional Edition
  • Microsoft Visual Basic Enterprise Edition for Windows 6.0
Keywords: 
kbbug kbdatabase kbfix kbjet kbmdacnosweep kbvs600sp4fix kbvs600sp5fix KB249350
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate

Mariano Barroumeres - ositear NOSPAM-AT-NOSPAM yahoo.com.ar Report As Irrelevant  
Written: 1/9/2008 10:15 AM
This crappy error message still raises even with all service packs installed in VB6. Check out that the select statement which retrieves the data from the data source includes the whole primary key of the table. If it doesn't this error message might appear. At least it did to me, using Mysql 5, vb6 sp6 and MyOdbc