In chapter two of Daniel we find King Nebuchadnezzar having a difficult time sleeping mainly due to disturbing dreams. He has called upon all of the magicians, enchanters, sorcerers and astrologers to interpret his dreams and all of them have failed. Nebuchadnezzar has become so distraught and angry that he has ordered the execution of all the wise men of Babylon. This execution also includes Daniel, Shadrach, Meshach and Abednego. Daniel asked Arioch, the King's Commander in charge of putting to death the wise men, why did the King issue such a harsh decree. Arioch explained to Daniel the King's predicament and Daniel went to Nebuchadnezzar and asked for time to consult with his God for an answer to his troubling dreams. The King agreed.
Daniel prayed to God and gave Him honor and praise for His power and wisdom that is over all existence. Daniel asked for guidance and interpretation of the King's dreams. God granted Daniel's wish and to King Nebuchadnezzar he went. The King was so astonished at how Daniel had done what no other man in the kingdom could do that he placed him in a high position and lavished him with many gifts. David being a true believer gave all of the Credit to God and let the King know the same.
Summarized: Placing God first in our lives and realizing that He is our Helper and Leader that will guide us through everything if we only ask and believe is key. The gifts that were bestowed on Daniel by King Nebuchadnezzar were actually rewards from God through the King for Daniel's obedience and recognition of God power.