LizardKing
October 7th, 2001, 05:17 AM
Dear All,
I have a table which has a field that needs to be picked from a DataCombo.
The DataCombo is to be filled from another table. I did this using desgin-time
properties of the ADO Data Control and the DataCombo, and it is working fine.
I put a Cancel button on the form and I assigned it the following code:
private Sub cmdCancel_Click()
Adodc1.Recordset.CancelUpdate
Adodc1.Recordset.Move 0
End Sub
If I made a change to the DataCombo, then I clicked Cancel, The change is undone
and the old value is restored. Very nice.
After that I Changed the application to use run-time binding, and using ADODB.Recordset
instead of the ADO DataControl. I assigned the exact previous properties, the
only change is the use of run-time binding instead of design time.
Now the application functions very well, except for the Cancel Button, as it does not
revert the changes back, but instead it commits the change to the database.
However, if I have a TextBox bound to the same table, it will revert the changes back.
This problem seems to occur only with the DataCombo.
any help or suggestion is greately appreciated.
Thanks in advance.
Regards.
Abdullah.
I have a table which has a field that needs to be picked from a DataCombo.
The DataCombo is to be filled from another table. I did this using desgin-time
properties of the ADO Data Control and the DataCombo, and it is working fine.
I put a Cancel button on the form and I assigned it the following code:
private Sub cmdCancel_Click()
Adodc1.Recordset.CancelUpdate
Adodc1.Recordset.Move 0
End Sub
If I made a change to the DataCombo, then I clicked Cancel, The change is undone
and the old value is restored. Very nice.
After that I Changed the application to use run-time binding, and using ADODB.Recordset
instead of the ADO DataControl. I assigned the exact previous properties, the
only change is the use of run-time binding instead of design time.
Now the application functions very well, except for the Cancel Button, as it does not
revert the changes back, but instead it commits the change to the database.
However, if I have a TextBox bound to the same table, it will revert the changes back.
This problem seems to occur only with the DataCombo.
any help or suggestion is greately appreciated.
Thanks in advance.
Regards.
Abdullah.