You are not allowed to leave out scriptures that would give you the whole picture.
1 Kings 11:4
For when Solomon was old his wives turned away his heart after other gods, and his heart was not wholly true to the LORD his God, as was the heart of David his father.
1 Kings 11:7-8
7 Then did Solomon build an high place for Chemosh, the abomination of Moab, in the hill that is before Jerusalem, and for Molech, the abomination of the children of Ammon. (PRETTY STUPID OF A WISE MAN WOULDN'T YOU SAY)?
8 And likewise did he for all his strange wives, which burnt incense and sacrificed unto their gods.
9 And the Lord was angry with Solomon, because his heart was turned from the Lord God of Israel, which had appeared unto him twice,
We must include all scriptures not just the ones we think support our private interpretations. There are many things Ecclesiastes says that you will agree are from the perspective of the man who is searching for meaning.
For example: 3: I sought in mine heart to give myself unto wine, yet acquainting mine heart with wisdom; and to lay hold on folly, till I might see what was that good for the sons of men, which they should do under the heaven all the days of their life.
Everyone interprets this as his testimony of some of the vain things he did; No one takes this verse and teaches that it is ok to be give yourself to alcoholism or to "lay hold on folly".
Not everything Ecclesiastes says is how things really are. They are his perspective while "laying hold on folly" and doing stupid things because his heart had been turned away.
As to David:
3Put not your trust in princes,
nor in the son of man, in whom
there is no help.
4His breath goeth forth, he returneth to his earth; in that very day his thoughts perish.
5Happy
is he that
hath the God of Jacob for his help, whose hope
is in the LORD his God:
Don't trust in man, however powerful he is in this life the minute he dies his thoughts and plans perish. You can't take it with you, neither your wealth or your plans for greatness.
But those who trust in God have hope after they die. Their hope does not perish. Their hope for awaking in his likeness do not perish.
The truth is that as we study the Old Testament we find that very little is revealed about the afterlife.
The most prevalent thought that seems common throughout is that Sheol (hell) was a negative place for the wicked.
Jesus account of the rich man and Lazarus was one of the first most vivid explanations ever given.
More is revealed in the New Testament about the inheritance and glory promised to the saints than ever before and we should not go back to the limited revelation that the ancients had as the only verses to contemplate or make a doctrine out of.
Stephen saw Jesus standing at the right hand of the Father and said receive my spirit. And Jesus did. Moses and Elijah had a conversation with Jesus on the mount. They are not sleeping in a state of unconsciousness.