I have a problem with VB6(SP5), connecting via ADO to a
Personal Oracle 8.1.x database.
On one of my forms I have placed a DataGrid control which
is bound to an ADODC control. There are also a few TextBox
and DataCombo controls on that form.
If a record in the DataGrid is selected the appropriate
record is shown correctly in the controls on the form.
But when I change the data in the DataCombo and move to
the next record to update the database, the DataGrid does
not show the new data. Only if I change the contents of a
TextBox control, the DataGrid control shows the new data.
In all cases the database itself is correctly updated.
Only the display in the DataGrid control does not reflect
the change from the DataCombo control.
I tried to refresh the DataGrid with refresh/requery
methods but with no success.
Does anybody know how to manage this ? Are there any known
issues concerning the DataGrid (who can recommend another
grid control) ?
TIA for every hint.
Regards,
Jan
I am unable to reproduce the problem you described. I used on ADODC on my
form for the Northwind Products table and displayed the table in a
DataGrid. I used another ADODC for the Categories table, and set up a
DataCombo with RowSource set to the Categories ADODC, ListField set to
CategoryName, BoundColumn set to CategoryID, DataSource set to the Products
ADODC, and DataField set to CategoryID. When I change the Category for a
Product in the list, using the DataCombo, then move to the next record, the
new CategoryID is reflected in the DataGrid.
First I would check that you have the DataCombo correctly configured as
above, also described in the VB6 documentation on a page entitled "Linking
Two Tables Using the DataCombo and DataList Controls".
If you're not successful, the problem you described sounds similar to the
issue with the Data Environment described in:
Q191457 PRB: DataEnvironment Recordset Requery Does Not Refresh Controls
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q191457
My next suggestion would be to eliminate the ADO Data Control and try
binding your controls directly to ADO Recordsets. That way you remove one
layer where events can get lost. (And it's relatively easy to code one's
own "Move Next" button.)
Otherwise, since Requery does not work for you, you may need to rebind the
DataGrid using "Set DataGrid1.DataSource=..." in order to see the changes.
Best wishes,
-Doug
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Microsoft Strategic Technology
Protection Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.