Then Solomon sat on the throne of the Lord as king instead of David his father, and prospered; and all Israel obeyed him. (1 Chronicles 29:23)
Though David was still alive at this time, all active direction of the affairs of state was placed in the hands of Solomon.