because David did that which was right in the eyes of the LORD, and didn't turn aside from anything that he commanded him all the days of his life, except only in the matter of Uriyah the Chittite.
Did not Shlomo king of Yisra'el 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 Yisra'el: nevertheless even him did foreign women cause to sin.