Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

update does not update recordset

Status
Not open for further replies.

obulldog27

Programmer
Apr 26, 2004
169
US
Ok I know that the update method for ado in vb6 is used to save all changes made to a single record in a Recordset. I have a delete button that will clear textboxes out and then update the recordset but when I close and open the form the data in the textboxes are still there. Update is not working. I assume that if my recordset did not support update method then i would get an error stating just that.
If I use the <adodc1.recordset.save> instead then this actually does what I want but this is not what this method is for correct?
Also currently to save records to my database after editing data in textbox I have to click on the adodc1 record scroll then go back to the previously edited record to work continue working. How can I automatically save after each input change.

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComCtlLib.Button)
On Error Resume Next
Select Case Button.Key
Case "Delete"
amtdesp1.Text = ""
misc1.Text = ""
acc1.Text = ""
Adodc1.Recordset.Update
'Adodc1.Refresh <------ this will not work either
End Select
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top