Every action carries within itself the seed of its own reward or punishment. Nathaniel Hawthorne made a note to that effect when he was writing The Scarlet Letter. If you don't remember your high school English class, The Scarlet Letter is a novel about the consequences of actions and the ramifications of covering a sin.
David had some consequences to deal with. Because of his treachery in dealing with Bathsheba and Uriah, the child born to Bathsheba sickened and died. For a week, David fasted and prayed that God would change His mind and save the child. Still the child died.
When the child died, David stopped fasting and praying. The child was gone. Nothing could bring him back.
We all sin from time to time. It's part of the human condition. And when we sin, we'd like to pray successfully for crop failure. Most of the time, it doesn't work. Because every action carries the seed of consequence, we will reap what we sow, more than we sow, at a later date.
True repentance can sometimes bring on a crop failure, but we can't count on that. Our best course of action is to plant only good seed and pray for a bountiful harvest.
Keep us ever mindful that our actions have meaning. Help us remember that we are responsible for the fruits of our actions. Grant us the vision to see the consequences of our actions and the wisdom to avoid those that have negative outcomes.
In Jesus' most precious name.