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 INFORMATIONSteps to Reproduce Behavior
- Create a Standard EXE project in Visual Basic. Form1 is created by
default.
- 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.
- Drag the DataCombo, the DataGrid, and the ADO DataControl onto
the form.
- 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.
- 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.
- In the DataCombo properties, set the DataSource and RowSource to
ADODC1. Also, set the DataField, BoundColumn, and the ListField to
au_lname.
- Drag a CommandButton onto the form and paste the following line of code
in the Click event:
Adodc1.Recordset.Update
- Run the Project.
- Physically go to the DataCombo, click on the field, and make a
change by typing in several letters or numbers.
- 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
|