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.
Did not Solomon king of Israel sin by these things? yet among many nations was there no king like him, and he was beloved of his God, and God made him king over all Israel: nevertheless even him did strange women cause to sin.