Updating problem with the ADODC
I have my VB program connected to a database using the ADODC. All seems to be working fine except my Update routine. I used the Data Form wizard to crate this and it put on all my buttons for me and it created my Update routine also. My problem is this, if I manualy type in new data into one of the fields and then click on the update button all works fine, the database gets updated just like it should, however if I use code to put new data into a field and call the update routine the data in the database does not get updated. I can see the data in the field but it just won't update the database. Any Ideas ?
[619 byte] By [
AM003295] at [2007-11-11 7:13:48]

# 2 Re: Updating problem with the ADODC
This is the code to put data into two fields in the form that has the ADO
The ADO fields are located on a different form and are txtFields(20) and 21
Private Sub cmdCorrect_Click()
'now the entry is correct so log the unit into the cal lab
MetTrackEntry.txtFields(20).Text = CDate(Date) 'enter todays date
MetTrackEntry.txtFields(21).Text = "Cal" 'enter the reason
MetTrackEntry.datPrimaryRS.Recordset.Update
Call MetTrackEntry.cmdUpdate_Click
TimeDelay (2)
End Sub
Below is the update routine**************
Public Sub cmdUpdate_Click()
On Error GoTo UpdateErr
datPrimaryRS.Recordset.UpdateBatch adAffectAll
Exit Sub
UpdateErr:
MsgBox Err.Description
End Sub