9:1–9 Section
God repeated to Solomon the covenant that he had made with David. He told Solomon to walk faithfully with him like David had done. This means that someone is to love God and obey him as long as they live.
David hadn’t obeyed all the Law of Moses. He did some things that God hated. Those events are recorded in 2 Samuel. But he always turned away from his sin, repented and trusted God to forgive him.
He always worshipped only God and never worshipped false gods. The kings from David’s family line were to be like David in those ways.
If they weren’t then the covenant curses would happen to all the Israelites. This included the curses from the Mount Sinai covenant and the temple being destroyed.
Both the people and the king had to obey God and worship only him. Only then would they be safe from their enemies and receive the covenant blessings.