Update of thousands of records

Hi, colleague,

Is there a better way to update thousands of records in one click?

At this moment, the way I do it causes the server to run due to an error, due to the loop that I used.

If you can give an example, it would be great.

What I want is that if I click on the Update button, I will update each row one by one, so there should also be a progress bar, but I can do that myself.

How can I use a loop like foreach, .. for, .. to make thousands of updates …

Any help is really appreciated.