1 Kings 2:3-4 And keep the charge of the Lord thy God, to walk in his ways, to keep his statutes, and his commandments, and his judgments, and his testimonies, as it is written in the law of Moses, that thou mayest prosper in all that thou doest and whithersoever thou turnest thyself: That the Lord may continue his word which he spake concerning me, saying, If thy children take heed to their way, to walk before me in truth with all their heart and with all their soul, there shall not fail thee (said he) a man on the throne of Israel.
The last words of David to his son Solomon, as he was about to take over the throne of the kingdom, were to keep the faith and live according to the Law of God revealed through Moses. The response of David to his own passing was to charge his son to keep the charge of the Lord. If Solomon would be faithful to the Lord, to His Word, and to his calling as ruler, then he would prosper and his descendants would rule on the throne forever.
David did the right thing by charging his son to keep the charge, but ultimately Solomon failed to remain true to God’s Word, and after his death the kingdom was split in two. Under Solomon the Lord kept the kingdom strong because of David, not because of Solomon. He did prosper because of the wisdom from on high that God gave him, but he did not keep the kingdom intact because of his failure to keep. Therefore, a man was not kept in the throne until the promise of an eternal King would be fulfilled in Christ.
We also have failed to keep the commandments and walk before Him with all our heart and soul. We could not even faithfully keep the charge of our own particular calling in life perfectly. But God still loved us so that He would send the Son of David, a greater than Solomon, to keep the charge in our place. Now believers in Christ prosper and live in the Kingdom under the King of Kings.