How do we reconcile the futility of Ecclesiastes with the reward of heaven? There's no question that Christianity believes in heaven.  We have a tag here heaven filled with questions about it.

Having said this, there are many places in the Old Testament that speak of the futility of life and show that death is merely nothingness (Sheol).

Here's on place in particular:


  Ecclesiastes 9:3-6 (NIV)Emphasis added
  3 This is the evil in everything that happens under the sun: The same destiny overtakes all. The hearts of people, moreover, are full of evil and there is madness in their hearts while they live, and afterward they join the dead. 4 Anyone who is among the living has hope—even a live dog is better off than a dead lion! 
  
  5 For the living know that they will die,  but the dead know nothing;
  they have no further reward,  and even their name is forgotten.
  6 Their love, their hate  and their jealousy have long since vanished;
  never again will they have a part in anything that happens under the sun.  


Here's another verse that shows that there won't be a reward or punishment after death:


  Ecclesiastes 9:2 (NIV)
  All share a common destiny—the righteous and the wicked, the good and the bad, the clean and the unclean, those who offer sacrifices and those who do not. 
  
  As it is with the good,
    so with the sinful;
  as it is with those who take oaths,
    so with those who are afraid to take them.


With all this in mind, how do we reconcile the passages in the Old Testament with this understanding of heaven?

I'm seeking a Protestant viewpoint on this and am interested in any Protestant exegesis or doctrine or any historical facts regarding this issue.  Please support your answers.
We reconcile the two by keeping in mind that the "vanity" of Ecclesiastes is being told from the perspective of the world ("under the sun"), and not as a declaration of theological truth.  Ecclesiastes reaches its conclusion in the last two chapters, where we see that, in contrast to all the pursuits of the world which in the end don't amount to anything, lasting value can be found in righteous living, culminating in:


  Ecclesiastes 12:13-14
  
  13 Let us hear the conclusion of the whole matter: Fear God, and keep his commandments: for this is the whole duty of man.
  
  14 For God shall bring every work into judgment, with every secret thing, whether it be good, or whether it be evil.


This ending makes it clear that the author does believe in the final judgment, which would be kind of pointless if death was the end of everything.