9 Why did you despise the word of the Lord by doing what is evil in his eyes? You struck down Uriah the Hittite with the sword and took his wife to be your own. You killed him with the sword of the Ammonites.
6 you destroy those who tell lies. The bloodthirsty and deceitful you, Lord, detest.
(Read Psalm 5:1-6)
God is a prayer-hearing God. Such he has always been, and he is still as ready to hear prayer as ever. The most encouraging principle of prayer, and the most powerful plea in prayer, is, to look upon him as our King and our God. David also prays to a sin-hating God. sin is folly, and sinners are the greatest of all fools; fools of their own making. Wicked people hate God; justly are they hated of him, and this will be their endless misery and ruin. Let us learn the importance of truth and sincerity, in all the affairs of life. Liars and murderers resemble the devil, and are his children, therefore it may well be expected that God should abhor them. These were the characters of David's enemies; and such as these are still the enemies of Christ and his people.
Matthew Henry's Commentary on 2 Samuel 12:9
Commentary on 2 Samuel 12:1-14
(Read 2 Samuel 12:1-14)
God will not suffer his people to lie still in sin. By this parable Nathan drew from David a sentence against himself. Great need there is of prudence in giving reproofs. In his application, he was faithful. He says in plain terms, Thou art the man. God shows how much he hates sin, even in his own people; and wherever he finds it, he will not let it go unpunished. David says not a word to excuse himself or make light of his sin, but freely owns it. When David said, I have sinned, and Nathan perceived that he was a true penitent, he assured him his sin was forgiven. Thou shalt not die: that is, not die eternally, nor be for ever put away from God, as thou wouldest have been, if thou hadst not put away the sin. Though thou shalt all thy days be chastened of the Lord, yet thou shalt not be condemned with the world. There is this great evil in the sins of those who profess religion and relation to God, that they furnish the enemies of God and religion with matter for reproach and blasphemy. And it appears from David's case, that even where pardon is obtained, the Lord will visit the transgression of his people with the rod, and their iniquity with stripes. For one momentary gratification of a vile lust, David had to endure many days and years of extreme distress.