AddNew/REquery method of ADO Recordset not Working? 
Author Message
 AddNew/REquery method of ADO Recordset not Working?

I am having a problem with an ADO recordset created via DED.

I have an unbound DataList which is used to select an address. When an
address is selected, rscmdHomes bookmark is set to the selected item in
the DataList. As I click different addresses, the other data controls
all show the appropriate data.

Using a popup menu, I can add a record to rscmdHomes:

With devVirtuality.rscmdHome
 .AddNew
 !CompanyID = devVirtuality.rscmdCompany!CompanyID
 !HomeAddress = strAddress
 .Update
 .Requery
End With

I then rebind all of the data controls on the form which are bound to
the rscmdHomes recordset:

Set txtHomeAddress.DataSource = devVirtuality
Set txtHomeCity.DataSource = devVirtuality
Set cmbHomeState.DataSource = devVirtuality
Set txtHomeZip.DataSource = devVirtuality
Set txtListingPrice1.DataSource = devVirtuality
Set txtListingPrice2.DataSource = devVirtuality
Set txtHomeTaxes.DataSource = devVirtuality

According to Q191457, this should not only update the underlying
recordsource, but also update the controls bound to that recordsource.

I can look in the database and the new record is added to the table. The
problem is that whenever I then modify any of the other info for the new
Home and then click on a different home, I get an Operation Cancelled
runtime error and the record is never updated.

If I restart the program, I can then change data for that home. I don't
think my users want to have to exit the program every time they add a
new home.

Can anyone suggest how I can alleviate this problem so that the new
record can be edited?


Thanks,

Keith Bobick
BeekerSoft



Wed, 22 Jan 2003 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. .addnew method ADO does not work pls help

2. Requery method not working

3. Problem with ADO Recordset AddNew method

4. AddNew method does not work

5. DataEnv, ADO and VB6 Problem - Requery on command does not seem to work

6. AddNew Method not working for me anymore.

7. Addnew and update method in ADOCE not working ?

8. Recordset.AddNew not working Help

9. ADO, Identity in SQL 6.5, AddNew, not working...

10. Creating ADO recordset w/o database .Append not working correctly IIS5 win2000 Prof not .Net

11. ADO Recordset.Cancel method does'nt work

12. Find method does not work on recordset obtained from stored procedure

 

 
Powered by phpBB® Forum Software