After David became king, the Philistines were not happy. Remember David killed one of their best warriors, Goliath, not to mention thousands of soldiers. So the Philistines plotted to invade Israel and kill David. David prayed. God answered. The Philistines were defeated and David prayed again... thanking God for the victory.

The poles were placed through rings on the side of the Ark to carry the Ark, not for lifting the Ark unto a cart. No one bothered to read God's instructions for handling the Ark. It had been at Abinadab's home for 20 years and no one remembered the words of God. God is holy and we are sinful. That is why Moses couldn't look into the face of God and why no one could touch the Ark.
"David and those involved in transporting the ark erred in several ways. First, they had already lost the awe and reverence one should have for the holiness of God. Second, they had forgotten the clear instructions God set down in the law for the transporting of the ark." (Bible.org)
Do you give God the awe and respect that is due Him? Do you take His word seriously? It is easy for us to become lazy in our praying and Bible reading. God wants us to get to know Him better. Praying with reverence and reading our Bibles with respect draws us near to God and helps us live lives that please Him. Also, saying things like "Oh my God" and "OMG" are taking God's name casually and not with the reverence that He deserves. We should think about it before we say these things.

When God brought peace to Israel and David was settled in as king, David summoned Nathan the prophet. "The Ark of the covenant has never been in a temple. It has always been housed in a tent. Why should I be in this beautiful palace while the Ark of the Covenant is in a tent? I will build a beautiful temple for God!"
That night God spoke to Nathan and told him to tell David that He did not want David to build Him a temple. The reason is given to us in 1Chronicles 28. David had to kill a lot of Philistines during his life. God wanted someone without blood on his hands to build the temple, and that someone was David's son, Solomon..
God did however, promise David that his kingdom would last forever. He kept His promise because Jesus was born into the line of David! What a promise and a blessing!
David prayed and thanked God for His promise.