Sahih Bukhari | Volume 8 | Hadith Number 641

Narrated by Ibn 'Umar
Allah's Apostle met 'Umar bin Al-Khattab while the latter was going with a group of camel-riders, and he was swearing by his father. The Prophet said, "Lo! Allah forbids you to swear by your fathers, so whoever has to take an oath, he should swear by Allah or keep quiet."