In an article titled "Was Solomon a child of God?", a Hardshell thinks that the case of Solomon disproves the doctrine of the perseverence of the saints. The writer does what is typical with those who profess to believe in preservation while denying perseverence. He brings up the case of Solomon's sins and apostasy as if this proved that Solomon did not persevere. Sometimes such writers will bring up the case of Peter's apostasy, or that of Lot, to also prove that perseverence is not true. But, these writers do not understand the doctrine of perseverence, a doctrine that their Old Baptist forefathers professed to believe. It is not the teaching of perseverence that the saints cannot sin or fall, but that they shall be corrected and successfully chastened of the Lord and brought to repentance.
The Scriptures show that Solomon was indeed brought to repentance prior to his death. He wrote the Book of Ecclesisastes as a token of his repentance. His confessions and repentance in that book show that he had been restored, just as Peter also was brought to repentance.
Dr. Gill wrote:
"Secondly, objections are raised against the doctrine of the saints final perseverance from the sins and failures of persons eminent for faith and holiness; as Noah, Lot, David, Solomon, Peter, and others. But these are no proofs of their final and total falling away. As to Noah and Lot, though guilty of great sins, they have after this the character of truly good and righteous men. As for David, though by his fall his bones were broken, and the joy of his salvation was taken from him, and grace lay some time unexercised by him; yet the Spirit of God was not taken from him, as appears from his own words, when most sensible of his case (Ps. 51:11, 12). As for Solomon, though his backsliding was great, attended with aggravated circumstances, yet not total, see 1 Kings 11:4, 6 nor final, as to perish everlastingly; which would have been contrary to the promise of God, that his mercy should not depart from him (2 Sam. 7:14, 15). Besides, he was restored by repentance; and the book of Ecclesiastes was penned by him in his old age, as an acknowledgment and retractation of his former follies; and some persons, after his death, are spoken of with commendation, for walking in the way of Solomon, as well as in the way of David (2 Chron. 11:17). As for Peter, his fall was not total; Christ prayed for him, that his faith failed not; nor final; for he was quickly restored by repentance. And these various instances are recorded in scripture, not as instances of final and total apostasy, but of the weakness of the best of men in themselves; and for our caution and instruction, "to take heed lest we fall"." (A Body of Doctrinal Divinity, Book 6—Chapter 15 - Of the Perseverance of the Saints)