Usually you could delete the old connection on your local machine and then create a dynamic connection with the same name and then upload it.
Since you used the same name, no other files would need to be updated.
The errors you are seeing are probably because you changed the connection name and your scripts are now out of sync. Try deleting the connections and then creating the dynamic connection with the same name as the one you are replacing.