I am trying to do an update in the DB for every object inside a collection, so I would like to update the value of the SQLParameters so that it will reflect the current object in the collection.
Another thing, when I use command.Parameteres.Add(MySQLParameter), if I add the same SQLParameter twice, does it stack one over the other or does the SQLCommand knows it is the same SQLParameter and overrides its information?
Thank you!
Yes, you can change the
.Valueof a parameter. That is in fact expected, especially when you are calling the same command in a loop with different values. Do not add the parameter twice.