Let us hear the conclusion of the whole matter:
Fear God, and keep his commandments:
for this is the whole duty of man.
Ecclesiastes 12:13
"Solomon reveals his inner thoughts throughout his life. At the beginning of his reign over Israel, he asked God for “an understanding heart to judge thy people, that I may discern between good and bad” (1 Kings 3:9), and he subsequently became renowned for his wisdom (e.g., 23:28; 4:9).
Unfortunately, as is well documented in Scripture, his thirst for human wisdom led him into
compromise and disobedience, setting the stage for national apostasy and idolatry upon his death. The book of Ecclesiastes chronicles a series of experiments that he conducted in search for the highest human good, but each forced him to conclude that “all is vanity” (Ecclesiastes 1:2, etc.), that there is no humanly discernible pattern in the affairs of men.
"Solomon reveals his inner thoughts throughout his life. At the beginning of his reign over Israel, he asked God for “an understanding heart to judge thy people, that I may discern between good and bad” (1 Kings 3:9), and he subsequently became renowned for his wisdom (e.g., 23:28; 4:9).
Unfortunately, as is well documented in Scripture, his thirst for human wisdom led him into
compromise and disobedience, setting the stage for national apostasy and idolatry upon his death. The book of Ecclesiastes chronicles a series of experiments that he conducted in search for the highest human good, but each forced him to conclude that “all is vanity” (Ecclesiastes 1:2, etc.), that there is no humanly discernible pattern in the affairs of men.
However, he concludes, life is the gift of God and should be enjoyed (3:13). Furthermore, he recognized the eventual judgment of God and concluded it best to live in obedience to God’s commands (e.g., 3:16-17).
A true reverence for God necessarily results in obedience to His commands. Wise Solomon knew it, and Christ and the New Testament writers reinforced it (John 14:15; 1 John 5:2; etc.). Life’s harsh realities and seeming paradoxes are at times incomprehensible to us. Only by adopting a proper attitude toward life and God can we cope." JDM
A true reverence for God necessarily results in obedience to His commands. Wise Solomon knew it, and Christ and the New Testament writers reinforced it (John 14:15; 1 John 5:2; etc.). Life’s harsh realities and seeming paradoxes are at times incomprehensible to us. Only by adopting a proper attitude toward life and God can we cope." JDM