Abu Hurairah reported,

The Prophet ﷺ said that Sulayman bin Dawud, the prophet of Allah, declared, "Tonight I shall visit seventy wives, and each one will bear a son who will fight in the cause of Allah."His companion, or the angel, said to him, "Say, 'If Allah wills.'"But he did not say it and forgot. None of his wives bore a child except one, who delivered half a child.The Messenger of Allah ﷺ then said, "Had he said, 'If Allah wills,' he would not have broken his oath, and it would have been a means of fulfilling his need."

Muslim 4286

Sahih

و حدثنا محمد بن عباد وابن أبي عمر واللفظ لابن أبي عمر قالا حدثنا سفيان عن هشام بن حجير عن طاوس

عن أبي هريرة

عن النبي ﷺ قال قال سليمان بن داود نبي الله لأطوفن الليلة على سبعين امرأة كلهن تأتي بغلام يقاتل في سبيل الله فقال له صاحبه أو الملك قل إن شاء الله فلم يقل ونسي فلم تأت واحدة من نسائه إلا واحدة جاءت بشق غلام فقال رسول الله ﷺ ولو قال إن شاء الله لم يحنث وكان دركا له في حاجته

مسلم 4286صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Oaths
Chapter
Exception
Numbering
Darussalam 4286
Muslim 4286