A man came (to Sayyiduna Adi bin Hatim (may Allah be pleased with him)) and asked for a hundred dirhams. He said: "You ask me for a hundred dirhams when I am the son of Hatim?! By Allah, I will not give you." Then he said: "Had I not heard the Messenger of Allah (peace and blessings be upon him) saying: 'Whoever swears an oath and then sees something better than it, let him do what is better,' I would not have given it to you."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 14300