Ecclesiastes 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.

Solomon set out in his heart to give himself to wine and to take hold of folly, yet he intended to keep guiding his heart with wisdom while he made the trial. His aim was to test by experience whether wine and folly could satisfy him, and by that experiment to learn what is good for the sons of men to do under heaven through all the days of their life. The course marked his turning away from communion with God to indulgence of the senses. That turning was brought on by the pride of prosperity.