When you read Ecclesiastes you will read much ado about meaninglessness. Let’s go with Solomon, David’s son and King as the writer. God gave Solomon great wisdom but yet he said Ecclesiastes 1:16 “to himself, “look, I have increased in wisdom more than anyone who has ruled over Jerusalem before me; I have experienced much of wisdom and knowledge.” 17 Then I applied myself to the understanding of wisdom, and also of madness and folly, but I learned that this, too, is a chasing after the wind. 18 For with much wisdom comes much sorrow; the more knowledge, the more grief.” He then said, “Everything is meaningless. That’s odd because in Proverbs he wrote, “Proverbs 1:1 “The proverbs of Solomon son of David, king of Israel: for gaining wisdom and instruction; for understanding words of insight; for receiving instruction in prudent behavior, doing what is right and just and fair; 4 for giving prudence to those who are simple, knowledge and discretion to the young— 5 let the wise listen and add to their learning, and let the discerning get guidance— 6 for understanding proverbs and parables, the sayings and riddles of the wise. 7 The fear of the Lord is the beginning of knowledge, but fools despise wisdom and instruction. 1 Kings 4:32 “He spoke three thousand proverbs and his songs numbered a thousand and five.” But we have to ask did he listen.” Solomon later became a fool who did not listen to his own instructions that he gave others. For the rest of us, the word of God.
                As David neared the end of his life he gave Solomon a charge to live by. 1 Kings 2:2 “I am about to go the way of all the earth,” he said “So be strong, act like a man, 3 and observe what the Lord your God requires: Walk in obedience to him, and keep his decrees and commands, his laws and regulations, as written in the Law of Moses. Do this so that you may prosper in all you do and wherever you go 4 and that the Lord may keep his promise to me:” Then on top of this God even appeared to him and spoke to him twice. It appears that Solomon started out with some wisdom as he answered the Lord correctly. 1 Kings 3:5 “At Gibeon the Lord appeared to Solomon during the night in a dream, and God said, “Ask for whatever you want me to give you. 6 Solomon answered, “You have shown great kindness to your servant, my father David, because he was faithful to you and righteous and upright in heart. You have continued this great kindness to him and have given him a son to sit on his throne this very day. 7 “Now, Lord my God, you have made your servant king in place of my father David. But I am only a little child and do not know how to carry out my duties. 8 Your servant is here among the people you have chosen, a great people, too numerous to count or number. 9 So give your servant a discerning heart to govern your people and to distinguish between right and wrong. For who is able to govern this great people of yours?”
                This was the right answer and God then responds to him, “since you have asked for this and not for long life or wealth for yourself, nor have asked for the death of your enemies but for discernment in administering justice, 12 I will do what you have asked. I will give you a wise and discerning heart, so that there will never have been anyone like you, nor will there ever be. 13 Moreover, I will give you what you have not asked for—both wealth and honor—so that in your lifetime you will have no equal among kings. 14 And if you walk in obedience to me and keep my decrees and commands as David your father did, I will give you a long life.” 15 Then Solomon awoke—and he realized it had been a dream.” Then the second time was in 1 Kings 9:3 God said, “I have heard the prayer and plea you have made before me; I have consecrated this temple, which you have built, by putting my Name there forever. My eyes and my heart will always be there. 4 “As for you, if you walk before me faithfully with integrity of heart and uprightness, as David your father did, and do all I command and observe my decrees and laws, 5 I will establish your royal throne over Israel forever, as I promised David your father when I said, ‘You shall never fail to have a successor on the throne of Israel.’ 6 “But if you or your descendants turn away from me and do not observe the commands and decrees I have given you and go off to serve other gods and worship them, 7 then I will cut off Israel from the land I have given them and will reject this temple I have consecrated for my Name. Israel will then become a byword and an object of ridicule among all peoples. 8 This temple will become a heap of rubble. All who pass by will be appalled and will scoff and say, ‘Why has the Lord done such a thing to this land and to this temple?’ 9 People will answer, ‘Because they have forsaken the Lord their God, who brought their ancestors out of Egypt, and have embraced other gods, worshiping and serving them—that is why the Lord brought all this disaster on them.’”
                Not only did God give him great wisdom he also gave him great warnings about disobedience and what would happen. 1 Kings 4:29 “God gave Solomon wisdom and very great insight, and a breadth of understanding as measureless as the sand on the seashore. 30 Solomon’s wisdom was greater than the wisdom of all the people of the East, and greater than all the wisdom of Egypt. 31 He was wiser than anyone else.” But if we look at Solomon’s life we see wisdom without obedience is meaningless. You can have all the wisdom in the world and still loose the kingdom. You can be the writer of Proverbs and if you disobey by missing what was being said in chapters 1-9 and end up where the dead are because he followed folly.
                When you look back to Deuteronomy you see that Deuteronomy 17:16 “The king, moreover, must not acquire great numbers of horses for himself or make the people return to Egypt to get more of them, for the Lord has told you, “You are not to go back that way again.” 17 He must not take many wives, or his heart will be led astray. He must not accumulate large amounts of silver and gold.” He was literally seduced by the very thing he wrote about in Proverbs but did not observe. 1 Kings 10:23 “King Solomon was greater in riches and wisdom than all the other kings of the earth. 24 The whole world sought audience with Solomon to hear the wisdom God had put in his heart. “Solomon accumulated chariots and horses; he had fourteen hundred chariots and twelve thousand horses, which he kept in the chariot cities and also with him in Jerusalem. 27 The king made silver as common in Jerusalem as stones, and cedar as plentiful as sycamore-fig trees in the foothills. 28 Solomon’s horses were imported from Egypt and from Kue—the royal merchants purchased them from Kue at the current price. 29 They imported a chariot from Egypt for six hundred shekels of silver, and a horse for a hundred and fifty.” 1 Kings 11:1 King Solomon, however, loved many foreign women besides Pharaoh’s daughter—Moabites, Ammonites, Edomites, Sidonians and Hittites. 2 They were from nations about which the Lord had told the Israelites, “You must not intermarry with them, because they will surely turn your hearts after their gods.” Nevertheless, Solomon held fast to them in love. 3 He had seven hundred wives of royal birth and three hundred concubines, and his wives led him astray. 4 As Solomon grew old, his wives turned his heart after other gods, and his heart was not fully devoted to the Lord his God, as the heart of David his father had been. 5 He followed Ashtoreth the goddess of the Sidonians, and Molek the detestable god of the Ammonites. 6 So Solomon did evil in the eyes of the Lord; he did not follow the Lord completely, as David his father had done. 7 On a hill east of Jerusalem, Solomon built a high place for Chemosh the detestable god of Moab, and for Molek the detestable god of the Ammonites. 8 He did the same for all his foreign wives, who burned incense and offered sacrifices to their gods. 9 The Lord became angry with Solomon because his heart had turned away from the Lord, the God of Israel, who had appeared to him twice. 10 Although he had forbidden Solomon to follow other gods, Solomon did not keep the Lord’s command. 11 So the Lord said to Solomon, “Since this is your attitude and you have not kept my covenant and my decrees, which I commanded you, I will most certainly tear the kingdom away from you and give it to one of your subordinates.”
                Not only did his wives, possessions, money, horses chariots turn him, you have to also see that a problem in his life arose when it only took him seven years to build the temple and thirteen years to build the palace. His focus was not on God as much as it was himself. This was the beginning of the end for him. So now in Ecclesiastes we see a man who is distraught who states that everything is meaningless. This also is a lesson for us to persevere and not turn from the way, the truth and the life. He was told walk before me and be obedient but he did not and lost most of the kingdom to another. That was where Jeroboam became King. If you were to read most of Ecclesiastes you would come away thinking all is meaningless but these great words come at the end, not that there is nothing to glean in this book but these words at the end can save you from a life of woe and destruction. Ecclesiastes 12:3 “Now all has been heard; here is the conclusion of the matter: Fear God and keep his commandments, for this is the duty of all mankind. 14 For God will bring every deed into judgment, including every hidden thing, whether it is good or evil.”
                  Save yourself a lot of sorrow and follow the word of God from the beginning of your life to the end. Even the wisest person needs to humble themselves and follow God’s word till the end. Pay close attention to Proverbs 1-9 as these are not idle words but Proverbs 2:16 “Wisdom will save you also from the adulterous woman, from the wayward woman with her seductive words. Surely her house leads down to death and her paths to the spirits of the dead. 19 None who go to her return or attain the paths of life.” Psalm 118:4 (NIV) Let those who fear the LORD say: "His love endures forever." Fear God and keep his commandments, for this is the duty of all mankind.