When was solder invented?

About the same time as its original constituent metals - Lead (Pb in Chemistry) and Tin (Sn in Chemistry) - were discovered several thousand years ago.