As the time drew near for David to die, he charged his son Solomon, "I am about to go the way of all the earth. So be strong and prove yourself a man. And keep the charge of the LORD your God to walk in His ways and to keep His statutes, commandments, ordinances, and decrees, as is written in the Law of Moses, so that you may prosper in all you do and wherever you turn, and so that the LORD may fulfill His promise to me: 'If your descendants take heed to walk faithfully before Me with all their heart and soul, you will never fail to have a man on the throne of Israel.'
I will be his Father, and he will be My son. When he does wrong, I will discipline him with the rod of men and with the blows of the sons of men.
Significance
In 1 Kings 2:1-4, David charges Solomon to keep the Torah so that "the LORD may fulfill His promise to me: 'If your descendants take heed to walk faithfully before Me with all their heart and soul, you will never fail to have a man on the throne of Israel.'" This directly alludes to 2 Samuel 7:14, where God promised regarding Solomon, "I will be his Father, and he will be My son. When he does wrong, I will discipline him with the rod of men." David's charge incorporates both the promise (perpetual dynasty) and the warning (discipline for disobedience) from the Davidic covenant. The conditional framing in Kings applies specifically to individual kings' experience of blessing, while the unconditional covenant promise stands behind it.