Problem saving value to database using ADODC

I have  a textbox (txtCode) bound to an ADODC object (adoUpdate) with the following properties:
   DataSource = adoUpdate  
   DataField = dbField

I have a SAVE button that executes the following command:
   adoUpdate.Recordset.Update

The following works:
I can click on the textbox and type a new code.  When I click on the SAVE button, the typed code is saved to the database field.

The following does not work:
I can change the textbox using programming syntax (txtCode.text = "new code").  When I click on the SAVE button, the code is NOT saved to the database.

I need to pass a value to the txtCode.text property and then have the value saved to the database.  

Any suggestions why my value is being saved when I TYPE the value in the object, but not saved when I CODE the value to the text property?


seckelAsked:
Who is Participating?
 
iHadiCommented:
Hi seckel
Try the following:

instead of update use one of the move methods(movenext, movefirst,...). When moving the cursor, it automatically saves changes to the recordset even if you change the text of a textbox by code.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.