BUG: Cannot Force Update Using a DataCombo Bound to ADODC or DE

ID: Q193875


The information in this article applies to:
  • Microsoft Visual Basic Enterprise Edition for Windows, version 6.0


SYMPTOMS

If a DataCombo box is bound to a ADODC or the Data Environment and you try to force an update on the field that you changed in the DataCombo, it will not Update the backend database.


RESOLUTION

There are some workarounds for this behavior that include adding this line of code:


   Adodc1.Recordset.Move(0) 

instead of the Adodc1.Recordset.Update.

The Adodc1.Recordset.Move(0) will update the backend as soon as you issue this command. Moving off of the record using the Adodc1.Recordset.MoveNext or physically moving off the record by clicking on the navigation buttons on the ADO Data Control (moving off of the record) will also force an update.


STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.


MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a Standard EXE project in Visual Basic. Form1 is created by default.


  2. Go to the Project/Components menu and check Microsoft DataGrid Control 6.0, Microsoft DataList Controls 6.0, and the Microsoft ADO Data Control 6.0.


  3. Drag the DataCombo, the DataGrid, and the ADO DataControl onto the form.


  4. Go to the Properties of the ADO Data Control. Bind the ADO Data Control to the authors table in the pubs database on SQL Server. Do this by clicking the ellipse and picking the DSN name that is pointing to the Pubs Database.


  5. Under the RecordSource tab, pick adCmdTable under CommandType and then pick the authors table in the combo box below. Also make sure to set the correct password in the authentication tab.


  6. In the DataCombo properties, set the DataSource and RowSource to ADODC1. Also, set the DataField, BoundColumn, and the ListField to au_lname.


  7. Drag a CommandButton onto the form and paste the following line of code in the Click event:
    
          Adodc1.Recordset.Update
     


  8. Run the Project.


  9. Physically go to the DataCombo, click on the field, and make a change by typing in several letters or numbers.


  10. Click on the CommandButton to force the update and note that the au_lname on the DataGrid does not reflect the changes.


Additional query words: kbDSupport kbdse kbCtrl kbVBp kbADO200bug kbVBp600

Keywords : kbGrpVBDB
Version : WINDOWS:6.0
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: January 5, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.