The expression is “tinker’s dam”. It’s a wall of dough raised around a place which a plumber desires to flood with a coat of solder. The material can be but once used; being consequently thrown away as worthless.
"The earlier phrase [tinker's dam] simply migrated the short distance from curse to damn to give us the proper spelling of the phrase - tinker's damn."