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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADODC Update Issue

Status
Not open for further replies.

karateboy02

Programmer
Jul 26, 2007
12
0
0
US
I am having a problem with an adodc update. I use the adodc.recordset.update command and it works perfectly on every field that is edited by mouse click. It doesn't matter if it is a check box or a text box. However if I change the value in my code such as:

If textbox1.text = "1" then
textbox1.text = "0"
adodc1.recordset.update
end if

It never updates that record in the database. Any sugestions?
 
I seem to remember it only updates when you move away from the record or you have to have I think a adodc1.recordset.refresh or something like that.
I used to make it movenext and moveprevious to be sure unless it was at the end when I would do in in the reverse.
 
If I do a refresh then it will just pull the data already in the record which is not the data I want and does not do an update. Also I cannot move to another record because it is the only record in the recordset.
 
In order to avoid many headaches in your future I advise you not to use the ADODC control at all, and to use plain ADODB and code to retrieve, populate your forms, and then update the database back.

Regards

Frederico Fonseca
SysSoft Integrated Ltd

FAQ219-2884
FAQ181-2886
 
adodc1.recordset.Fields(textbox1.DataField).Value="0"
adodc1.recordset.update
 

adodc1.recordset.Fields(textbox1.DataField).Value="0"
adodc1.recordset.update


This works perfectly, thank you very much.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top