It is said that the [Quran contains no errors][1] and is the direct word of Allah, flawless until the end of time.

The Hadith are not always right, hence why it's become the lifetime work by many scholars just to verify them. But they are valued as a collection of advice/rulings from those who are most knowledgeable in Islam.

So, my question is whether in the case of the Quran conflicting with a Hadith, the rulings from the Quran should be used instead? In cases of conflict between these sources, how is it normally resolved?

Some examples of conflicts:

 - Sahih hadith says that Zina is punishable by stoning, Quran says that Zina is punishable by flogging ([Wikipedia][2])
 - "No compulsion in religion" versus death penalty on apostates ([local][3])


  [1]: https://islam.stackexchange.com/questions/639/is-it-possible-that-the-quran-contains-any-errors
  [2]: http://en.wikipedia.org/wiki/Zina
  [3]: https://islam.stackexchange.com/questions/1739/how-do-we-reconcile-the-apostasy-ruling-with-al-baqarah-2256