1 Kings 15:5

in that David did that which is right in the eyes of Jehovah, and turned not aside from all that He commanded him all days of his life -- only in the matter of Uriah the Hittite;

1 Kings 14:8

and rend the kingdom from the house of David, and give it to thee, -- and thou hast not been as My servant David who kept My commands, and who walked after Me with all his heart, to do only that which is right in Mine eyes,

2 Samuel 11:15-17

and he writeth in the letter, saying, 'Place ye Uriah over-against the front of the severest battle, and ye have turned back from after him, and he hath been smitten, and hath died.'

2 Samuel 12:9-10

'Wherefore hast thou despised the word of Jehovah, to do the evil thing in His eyes? Uriah the Hittite thou hast smitten by the sword, and his wife thou hast taken to thee for a wife, and him thou hast slain by the sword of the Bene-Ammon.

1 Kings 9:4

And thou -- if thou dost walk before Me as David thy father walked, in simplicity of heart, and in uprightness, to do according to all that I have commanded thee -- My statutes and My judgments thou dost keep --

Luke 1:6

and they were both righteous before God, going on in all the commands and righteousnesses of the Lord blameless,

2 Samuel 11:3-4

and David sendeth and inquireth about the woman, and saith, 'Is not this Bath-Sheba, daughter of Eliam, wife of Uriah the Hittite?'

1 Kings 15:3

and he walketh in all the sins of his father, that he did before him, and his heart hath not been perfect with Jehovah his God, as the heart of David his father;

2 Kings 22:2

and he doth that which is right in the eyes of Jehovah, and walketh in all the way of David his father, and hath not turned aside -- right or left.

2 Chronicles 34:2

and he doth that which is right in the eyes of Jehovah, and walketh in the ways of David his father, and hath not turned aside -- right or left.

Psalm 51:1

To the Overseer. -- A Psalm of David, in the coming in unto him of Nathan the prophet, when he hath gone in unto Bath-Sheba. Favour me, O God, according to Thy kindness, According to the abundance of Thy mercies, Blot out my transgressions.

Psalm 119:6

Then I am not ashamed In my looking unto all Thy commands.

Acts 13:22

and having removed him, He did raise up to them David for king, to whom also having testified, he said, I found David, the son of Jesse, a man according to My heart, who shall do all My will.

Acts 13:36

for David, indeed, his own generation having served by the will of God, did fall asleep, and was added unto his fathers, and saw corruption,

Treasury of Scripture Knowledge

Summary

Because David did that which was right in the eyes of the LORD, and turned not aside from any thing that he commanded him all the days of his life, save only in the matter of Uriah the Hittite.

Bible References

David

1 Kings 15:3
and he walketh in all the sins of his father, that he did before him, and his heart hath not been perfect with Jehovah his God, as the heart of David his father;
1 Kings 14:8
and rend the kingdom from the house of David, and give it to thee, -- and thou hast not been as My servant David who kept My commands, and who walked after Me with all his heart, to do only that which is right in Mine eyes,
2 Kings 22:2
and he doth that which is right in the eyes of Jehovah, and walketh in all the way of David his father, and hath not turned aside -- right or left.
2 Chronicles 34:2
and he doth that which is right in the eyes of Jehovah, and walketh in the ways of David his father, and hath not turned aside -- right or left.
Psalm 119:6
Then I am not ashamed In my looking unto all Thy commands.
Luke 1:6
and they were both righteous before God, going on in all the commands and righteousnesses of the Lord blameless,
Acts 13:22
and having removed him, He did raise up to them David for king, to whom also having testified, he said, I found David, the son of Jesse, a man according to My heart, who shall do all My will.