1 Kings 15:5

because David did what was right in the eyes of Jehovah, and did not turn aside from all that He commanded him all the days of his life, except in the matter of Uriah the Hittite.

1 Kings 14:8

and tore the kingdom away from the house of David and gave it to you. And you have not been as My servant David who kept My commandments, and who followed Me with all his heart, to do only what was right in My eyes.

2 Samuel 11:15-17

And he wrote in the letter, saying, Set Uriah in the forefront of the hottest battle, and draw back from him so that he may be stricken and die.

2 Samuel 12:9-10

Why have you despised the Word of Jehovah, to do evil in His sight? You have stricken Uriah the Hittite with the sword, and have taken his wife to be your wife, and have killed him with the sword of the sons of Ammon.

1 Kings 9:4

And if you will walk before Me as David your father walked, in integrity of heart and in uprightness, to do according to all that I have commanded you; and if you will keep My statutes and My judgments,

Luke 1:6

And they were both righteous before God, walking blameless in all the commandments and ordinances of the Lord.

2 Samuel 11:3-4

And David sent and asked about the woman. And one said, Is not this Bathsheba, the daughter of Eliam, the wife of Uriah the Hittite?

1 Kings 15:3

And he walked in all the sins of his father which he had done before him. And his heart was not perfect with Jehovah his God, as the heart of David his father.

2 Kings 22:2

And he did the right in the sight of Jehovah, and walked in all the way of David his father, and did not turn aside to the right or to the left.

2 Chronicles 34:2

And he did the right in the sight of Jehovah, and walked in the ways of David his father, and did not turn aside to the right nor to the left.

Psalm 51:1

To the Chief Musician. A Psalm of David, when Nathan the prophet came to him, after he had gone in to Bathsheba. Have mercy on me, O God, according to Your loving-kindness; according to the multitude of Your tender mercies, blot out my transgressions.

Psalm 119:6

Then I shall not be ashamed, when I have respect to all Your Commandments.

Acts 13:22

And when He had removed him, He raised up David to them to be their king; to whom He also witnessed and said, I have found David the son of Jesse to be a man after My own heart, who shall fulfill all My will.

Acts 13:36

For after he had served his own generation by the will of God, David fell asleep and was added to 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 walked in all the sins of his father which he had done before him. And his heart was not perfect with Jehovah his God, as the heart of David his father.
1 Kings 14:8
and tore the kingdom away from the house of David and gave it to you. And you have not been as My servant David who kept My commandments, and who followed Me with all his heart, to do only what was right in My eyes.
2 Kings 22:2
And he did the right in the sight of Jehovah, and walked in all the way of David his father, and did not turn aside to the right or to the left.
2 Chronicles 34:2
And he did the right in the sight of Jehovah, and walked in the ways of David his father, and did not turn aside to the right nor to the left.
Psalm 119:6
Then I shall not be ashamed, when I have respect to all Your Commandments.
Luke 1:6
And they were both righteous before God, walking blameless in all the commandments and ordinances of the Lord.
Acts 13:22
And when He had removed him, He raised up David to them to be their king; to whom He also witnessed and said, I have found David the son of Jesse to be a man after My own heart, who shall fulfill all My will.