Bismillah.
Volume 3, Book 31, Number 195:
Narrated 'Abdullah bin 'Amr bin Al-'As (radiallaahu `anhu):
"Once Allah's Apostle (sallallaahu `alayhi wasallam) came to me," and then he narrated the whole narration, i.e. your guest has a right on you, and your wife has a right on you. I then asked about the fasting of David (`alayhissalaam). The Prophet (sallallaahu `alayhi wasallam) replied, "Half of the year," (i.e. he used to fast on every alternate day).
Volume 3, Book 31, Number 196:
Narrated 'Abdullah bin 'Amr bin Al-'As (radiallaahu `anhu):
Allah's Apostle (sallallaahu `alayhi wasallam) said to me, "O 'Abdullah! Have I not been informed that you fast during the day and offer prayers all the night." 'Abdullah (radiallaahu `anhu) replied, "Yes, O Allah's Apostle (sallallaahu `alayhi wasallam)!" The Prophet (sallallaahu `alayhi wasallam) said, "Don't do that; fast for few days and then give it up for few days, offer prayers and also sleep at night, as your body has a right on you, and your wife has a right on you, and your guest has a right on you. And it is sufficient for you to fast three days in a month, as the reward of a good deed is multiplied ten times, so it will be like fasting throughout the year." I insisted (on fasting) and so I was given a hard instruction. I said, "O Allah's Apostle (sallallaahu `alayhi wasallam)! I have power." The Prophet (sallallaahu `alayhi wasallam) said, "Fast like the fasting of the Prophet David (`alayhissalaam) and do not fast more than that." I said, "How was the fasting of the Prophet of Allah, David?" He said, "Half of the year," (i.e. he used to fast on every alternate day).
Afterwards when 'Abdullah (radiallaahu `anhu) became old, he used to say, "It would have been better for me if I had accepted the permission of the Prophet (sallallaahu `alayhi wasallam) (which he gave me i.e. to fast only three days a month)."
Volume 3, Book 31, Number 197:
Narrated 'Abdullah bin 'Amr (radiallaahu `anhu):
Allah's Apostle (sallallaahu `alayhi wasallam) was informed that I had taken an oath to fast daily and to pray (every night) all the night throughout my life (so Allah's Apostle (sallallaahu `alayhi wasallam) came to me and asked whether it was correct): I replied, "Let my parents be sacrificed for you! I said so." The Prophet (sallallaahu `alayhi wasallam) said, "You can not do that. So, fast for few days and give it up for few days, pray and sleep. Fast three days a month as the reward of good deeds is multiplied ten times and that will be equal to one year of fasting." I replied, "I can do better than that." The Prophet (sallallaahu `alayhi wasallam) said to me, "Fast one day and give up fasting for a day and that is the fasting of Prophet David (`alayhissalaam) and that is the best fasting." I said, "I have the power to fast better (more) than that." The Prophet (sallallaahu `alayhi wasallam) said, "There is no better fasting than that."
Volume 3, Book 31, Number 198:
Narrated 'Abdullah bin 'Amr (radiallaahu `anhu):
The news of my daily fasting and praying every night throughout the night reached the Prophet (sallallaahu `alayhi wasallam). So he sent for me or I met him, and he said, "I have been informed that you fast everyday and pray every night (all the night). Fast (for some days) and give up fasting (for some days); pray and sleep, for your eyes have a right on you, and your body and your family (i.e. wife) have a right on you." I replied, "I have more power than that (fasting)." The Prophet (sallallaahu `alayhi wasallam) said, "Then fast like the fasts of (the Prophet) David (`alayhissalaam)". I said, "How?" He replied, "He used to fast on alternate days, and he used not to flee on meeting the enemy." I said, "From where can I get that chance?" ('Ata' said, "I do not know how the expression of fasting daily throughout the life occurred.") So, the Prophet (sallallaahu `alayhi wasallam) said, twice, "Whoever fasts daily throughout his life is just as the one who does not fast at all."
Volume 3, Book 31, Number 199:
Narrated Mujahid from 'Abdullah bin 'Amr (radiallaahu `anhu):
The Prophet (sallallaahu `alayhi wasallam) said (to 'Abdullah), "Fast three days a month." 'Abdullah (radiallaahu `anhu) said, (to the Prophet) "I am able to fast more than that." They kept on arguing on this matter till the Prophet said, "Fast on alternate days, and recite the whole Qur'an once a month." 'Abdullah (radiallaahu `anhu) said, "I can recite more (in a month)," and the argument went on till the Prophet (sallallaahu `alayhi wasallam) said, "Recite the Qur'an once each three days." (i.e. you must not recite the whole Qur'an in less than three days).
Volume 3, Book 31, Number 200:
Narrated 'Abdullah bin 'Amr bin Al-'As (radiallaahu `anhu):
The Prophet (sallallaahu `alayhi wasallam) said to me, "You fast daily all the year and pray every night all the night?" I replied in the affirmative. The Prophet (sallallaahu `alayhi wasallam) said, "If you keep on doing this, your eyes will become weak and your body will get tired. He who fasts all the year is as he who did not fast at all. The fasting of three days (a month) will be equal to the tasting of the whole year." I replied, "I have the power for more than this." The Prophet (sallallaahu `alayhi wasallam) said, "Then fast like the fasting of David (`alayhissalaam) who used to fast on alternate days and would never flee from the battle field, on meeting the enemy.
Volume 3, Book 31, Number 201:
Narrated 'Abdullah bin 'Amr (radiallaahu `anhu):
Allah's Apostle (sallallaahu `alayhi wasallam) was informed about my fasts, and he came to me and I spread for him a leather cushion stuffed with palm fires, but he sat on the ground and the cushion remained between me and him, and then he said, "Isn't it sufficient for you to fast three days a month?" I replied, "O Allah's Apostle (sallallaahu `alayhi wasallam)! (I can fast more)." He said, "Five?" I replied, "O Allah's Apostle (sallallaahu `alayhi wasallam)! (I can fast more)." He said, "Seven?" I replied, "O Allah's Apostle (sallallaahu `alayhi wasallam)! (I can fast more)." He said, "Nine (days per month)?" I replied, "O Allah's Apostle (sallallaahu `alayhi wasallam)! (I can fast more)" He said, "Eleven (days per month)?" And then the Prophet (sallallaahu `alayhi wasallam) said, "There is no fast superior to that of the Prophet David (`alayhissalaam) it was for half of the year. So, fast on alternate days."
Here's another narration (not from this sequence in Bukhari) that helps understand the topic better:
It was narrated from Abu Qutaadah al-Ansaari (may Allaah be pleased with him) that the Messenger of Allaah (peace and blessings of Allaah be upon him) was asked about his fasting. The Messenger of Allaah (peace and blessings of Allaah be upon him) got angry, then ‘Umar (may Allaah be pleased with him) said, “We are content with Allah as our Lord, with Islam as our religion, with Muhammad as our Prophet and with the oath of allegiance (bay’ah) that we have given.” Then he was asked about one who fasts for a lifetime and he said, “He did not fast and he did not break his fast.” [I.e., it becomes a routine for him such that he no longer feels the difference between fasting and not fasting] Then he was asked about fasting two days and not fasting for one day, and he said, “Who is able to do that?” Then he was asked about fasting one day and not fasting for two days, and he said, “Would that Allaah gave us strength for that.” And he was asked about fasting one day and not fasting one day (i.e., fasting alternate days) and he said, “That is the fasting of my brother Dawood (peace be upon him).” And he was asked about fasting on Mondays, and he said, “That is the day on which I was born and the day on which my mission began (or on which Revelation came down to me).” And he said, “Fasting for three days each month and Ramadaan each year is the fast of a lifetime.” And he was asked about fasting on the Day of ‘Arafaah, and he said, “It expiates for the past year and the coming year,” and he was asked about fasting on the Day of ‘Ashoora’, and he said, “It expiates for the past year.” Narrated by Muslim, 1162.
It is clear from this hadeeth that fasting is encouraged, whether it is one or two days each year, one day each week, three days each month, fasting one day and not fasting two days or vice versa, or fasting one day and not the next. The matter is flexible. But the fast of Dawud (`alayhissalaam) is most encouraged because by fasting on alternate days, you never really get used to fasting and/or not fasting. It's not easy, hence the reward.
One important lesson: it's good to commit to great tasks of worship when you have the energy and power to do so. But in lieu of 'continuity and balance', it's advisable to commit to amounts you can continue even when weak or old. Learn this from the experience of Abdullah ibn Amr (radiallaahu `anhu) when he says:
It would have been better for me if I had accepted the permission of the Prophet (sallallaahu `alayhi wasallam) (which he gave me i.e. to fast only three days a month).
Taken from: http://ilookilisten.wordpress.com/2013/08/26/the-fast-of-david-ahadith-1690-1696/