DOCUMENT:Q193875 15-OCT-1998 [vbwin] TITLE :BUG: Cannot Force Update Using a DataCombo Bound to ADODC or DE PRODUCT :Microsoft Visual Basic for Windows PROD/VER:WINDOWS:6.0 OPER/SYS:WINDOWS KEYWORDS: ====================================================================== --------------------------------------------------------------------- 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 ====================================================================== Version : WINDOWS:6.0 Platform : WINDOWS Issue type : kbbug ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 1998.