ADO: .update command not mandatory for each record?

  • Thread starter Thread starter The Dude
  • Start date Start date
T

The Dude

Hello :)

Due to a variable name error, I have noticed that records can still be added
although there is no .update command in the code - except for the last record.

Hence my question : Can I loop and add records with .addnew and only use
..update command at the end of the loop (to add the last one)?
It seems to be working, but is it a problem if I do it?

Thanks
T_D
 
The said:
Hello :)

Due to a variable name error, I have noticed that records can still
be added although there is no .update command in the code - except
for the last record.

Hence my question : Can I loop and add records with .addnew and only
use .update command at the end of the loop (to add the last one)?
It seems to be working, but is it a problem if I do it?

Thanks
T_D

Yes.

If you move from the record you're editing, ADO will save the changes,
without having to call the .update method.
 
Back
Top