When David received this promise, he was very humble and respectful. But something obviously changed in his life and he became more selfish and followed his passions. When he saw a woman (Bathsheba) bathing, he brought her in to have sex with her. When she became pregnant, he finally arranged to have her husband killed so he could marry her. He engaged in a conspiracy in order to protect himself. As a result, God made another promise to David: David's family would always have strife in it. This played out immediately in David's family, as one son raped his step-sister and then was killed by another son.
David went from high to low, from promise to peril. He received two promises from God, one of favor and of strife. Why? Because he failed to follow God with all his heart but followed his passions instead.
What about you? How do you view yourself before God? Are you humbly seeking to follow him with your whole heart all the time? Or do you give God your best just some of the time while following your passions the rest of the time?
God wants our whole heart. He wants complete, sincere, and pure obedience that springs from love for him. David gives us an example of the spirituality of moving from promise to peril. We can learn from him how to live in God's favor and avoid God's disfavor.