No. David repented and Solomon died and went to hell (Ge 2:24).
Solomon repented of all he did,and did not go to hell.
Solomon wrote the book of Ecclesiastes.
Ecc 1:1 The words of the Preacher, the son of David, king in Jerusalem.
Ecc 1:2 Vanity of vanities, saith the Preacher, vanity of vanities; all is vanity.
Ecc 1:3 What profit hath a man of all his labour which he taketh under the sun?
Ecc 1:12 I the Preacher was king over Israel in Jerusalem.
Ecc 1:13 And I gave my heart to seek and search out by wisdom concerning all things that are done under heaven: this sore travail hath God given to the sons of man to be exercised therewith.
Ecc 1:14 I have seen all the works that are done under the sun; and, behold, all is vanity and vexation of spirit.
Ecc 1:15 That which is crooked cannot be made straight: and that which is wanting cannot be numbered.
Ecc 1:16 I communed with mine own heart, saying, Lo, I am come to great estate, and have gotten more wisdom than all they that have been before me in Jerusalem: yea, my heart had great experience of wisdom and knowledge.
Ecc 1:17 And I gave my heart to know wisdom, and to know madness and folly: I perceived that this also is vexation of spirit.
Ecc 1:18 For in much wisdom is much grief: and he that increaseth knowledge increaseth sorrow.
Ecc 2:1 I said in mine heart, Go to now, I will prove thee with mirth, therefore enjoy pleasure: and, behold, this also is vanity.
Ecc 2:2 I said of laughter, It is mad: and of mirth, What doeth it?
Ecc 2: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.
Ecc 2:4 I made me great works; I builded me houses; I planted me vineyards:
Ecc 2:5 I made me gardens and orchards, and I planted trees in them of all kind of fruits:
Ecc 2:6 I made me pools of water, to water therewith the wood that bringeth forth trees:
Ecc 2:7 I got me servants and maidens, and had servants born in my house; also I had great possessions of great and small cattle above all that were in Jerusalem before me:
Ecc 2:8 I gathered me also silver and gold, and the peculiar treasure of kings and of the provinces: I gat me men singers and women singers, and the delights of the sons of men, as musical instruments, and that of all sorts.
Ecc 2:9 So I was great, and increased more than all that were before me in Jerusalem: also my wisdom remained with me.
Ecc 2:10 And whatsoever mine eyes desired I kept not from them, I withheld not my heart from any joy; for my heart rejoiced in all my labour: and this was my portion of all my labour.
Ecc 2:11 Then I looked on all the works that my hands had wrought, and on the labour that I had laboured to do: and, behold, all was vanity and vexation of spirit, and there was no profit under the sun.
Ecc 2:12 And I turned myself to behold wisdom, and madness, and folly: for what can the man do that cometh after the king? even that which hath been already done.
Ecc 2:13 Then I saw that wisdom excelleth folly, as far as light excelleth darkness.
Ecc 3:14 I know that, whatsoever God doeth, it shall be for ever: nothing can be put to it, nor any thing taken from it: and God doeth it, that men should fear before him.
Ecc 3:15 That which hath been is now; and that which is to be hath already been; and God requireth that which is past.
Ecc 3:16 And moreover I saw under the sun the place of judgment, that wickedness was there; and the place of righteousness, that iniquity was there.
Ecc 3:17 I said in mine heart, God shall judge the righteous and the wicked: for there is a time there for every purpose and for every work.
Ecc 12:9 And moreover, because the preacher was wise, he still taught the people knowledge; yea, he gave good heed, and sought out, and set in order many proverbs.
Ecc 12:10 The preacher sought to find out acceptable words: and that which was written was upright, even words of truth.
Ecc 12:11 The words of the wise are as goads, and as nails fastened by the masters of assemblies, which are given from one shepherd.
Ecc 12:12 And further, by these, my son, be admonished: of making many books there is no end; and much study is a weariness of the flesh.
Ecc 12:13 Let us hear the conclusion of the whole matter: Fear God, and keep his commandments: for this is the whole duty of man.
Ecc 12:14 For God shall bring every work into judgment, with every secret thing, whether it be good, or whether it be evil.
Solomon applied himself to enjoy the best of life,along with many women,but said it is all vanity,and vexation of spirit,and no profit under the sun,and came to his senses,and gave it all up,and said,out of all we do on earth the only profit is to fear God,and keep his commandments,for that is the whole duty of man,for God will judge everyone according to their works,whether they be good or bad.
Solomon repented of all his folly,and wrongful ways,and followed God after that point,realizing that is the only profit.
Solomon repented,for what good is he for a witness to not do those things he did,but only follow God,if he did not repent,and even wrote a book concerning his folly,and that he said it is without profit,but only follow God.