Narrated 'Umar bin Al-Khatab: Once I gave a horse (for riding) in Allah's Cause. Later I saw it being sold. I asked Allah's Apostle (whether I could buy it). He said, "Don't buy it, for you should not get back what you have given in charity."
— Sahih Bukhari, Volume 3, Book 47: Gifts, Hadith #804
Narrated 'Umar bin Al-Khatab: Once I gave a horse (for riding) in Allah's Cause. Later I saw it being sold. I asked Allah's Apostle (whether I could buy it). He said, "Don't buy it, for you should not get back what you have given in charity."
This hadith is from the book of Gifts in Sahih Bukhari, compiled by Imam al-Bukhari. It is hadith number 804 in book 47 of volume 3.
This hadith is referenced in the following topics: How to Give Charity.