1 Kings 15:5

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

1 Kings 14:8

and rent the kingdom away from the house of David, and gave it thee; and yet thou hast not been as my servant David, who kept my commandments, and who followed me with all his heart, to do that only which was right in mine eyes,

2 Samuel 11:15-17

And he wrote in the letter, saying, Set ye Uriah in the forefront of the hottest battle, and retire ye from him, that he may be smitten, and die.

2 Samuel 12:9-10

Wherefore hast thou despised the word of Jehovah, to do that which is evil in his sight? thou hast smitten Uriah the Hittite with the sword, and hast taken his wife to be thy wife, and hast slain him with the sword of the children of Ammon.

1 Kings 9:4

And as for thee, if thou wilt walk before me, as David thy father walked, in integrity of heart, and in uprightness, to do according to all that I have commanded thee, and wilt keep my statutes and mine ordinances;

Luke 1:6

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

2 Samuel 11:3-4

And David send and inquired after the woman. And one said, Is not this Bath-sheba, 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 that which was right in the eyes of Jehovah, and walked in all the way of David his father, and turned not aside to the right hand or to the left.

2 Chronicles 34:2

And he did that which was right in the eyes of Jehovah, and walked in the ways of David his father, and turned not aside to the right hand or to the left.

Psalm 51:1

Have mercy upon me, O God, according to thy lovingkindness: According to the multitude of thy tender mercies blot out my transgressions.

Psalm 119:6

Then shall I not be put to shame, When I have respect unto all thy commandments.

Acts 13:22

And when he had removed him, he raised up David to be their king; to whom also he bare witness and said, I have found David the son of Jesse, a man after My heart, who shall do all My will.

Acts 13:36

For David, after he had in his own generation served the counsel of God, fell asleep, and was laid 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 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 rent the kingdom away from the house of David, and gave it thee; and yet thou hast not been as my servant David, who kept my commandments, and who followed me with all his heart, to do that only which was right in mine eyes,
2 Kings 22:2
And he did that which was right in the eyes of Jehovah, and walked in all the way of David his father, and turned not aside to the right hand or to the left.
2 Chronicles 34:2
And he did that which was right in the eyes of Jehovah, and walked in the ways of David his father, and turned not aside to the right hand or to the left.
Psalm 119:6
Then shall I not be put to shame, When I have respect unto all thy commandments.
Luke 1:6
And they were both righteous before God, walking in all the commandments and ordinances of the Lord blameless.
Acts 13:22
And when he had removed him, he raised up David to be their king; to whom also he bare witness and said, I have found David the son of Jesse, a man after My heart, who shall do all My will.

American Standard Version Public Domain