It is very easy to misunderstand what Solomon is saying in some parts of chapter 7 and he could easily be labelled as a sexist. Just have a look at some of these words to see my point, but then I want to clarify the context of what he is saying."I discovered that a seductive woman is a trap more bitter than death. Her passion is a snare, and her soft hands are chains. Those who are pleasing to God will escape her, but sinners will be caught in her snare.
... Only one out of a thousand men is virtuous, but not one woman! But I did find this: God created people to be virtuous, but they have each turned to follow their own downward path.” (Ecclesiastes 7:26, 28-29)
Firstly, we must remember that Solomon is the guy who refers to wisdom as a Woman in book of Proverbs. We can conclude that he does respect women in many ways, but would also have been a "man of his time", with many different views on the role of women in his kingdom.
Secondly, the woman he is referring to in verse 27, is the 'seductive' woman, and not all women! Ecclesiastes (like Proverbs) were used as teachings to the young men of the Jewish communities, informing them of all the virtues and vices in life. He wanted the younger guys to be cautious of this as they could land up in trouble. He could just as easily used this passage to instruct our young women in today's world too - that we should be wary of anyone who tries to seduce us in anyway.
Thirdly, his statement about not finding one righteous woman (out of a thousand) and only 1 righteous man, is interesting. However, we must remember that it was only the men who were given religious instruction in their generation - so this actually makes the men look far worse than the women. The men had all the correct teaching and still they didn't get it right.
Solomon's conclusion is that although God created us to follow Him, we have all turned to go our own way. And so we need to draw a connection to the Gospel's here, where we see the gift of Jesus rescuing us from our sin.
Hope this makes some sense to us all.
Living in Grace