because David did that which was right in the eyes of the Lord and did not turn aside from anything that He commanded him all the days of his life, except in the matter involving Uriah the Hittite.
Did not Solomon king of Israel sin by these things? Yet among many nations there was no king like him. He was loved by his God, who made him king over all Israel. Nevertheless, foreign women caused even him to sin.