Psychologists Nancy McWilliams and Stanley Lependorf note that ingratitude is often linked with narcissism, an extreme form of self-centeredness. They write, "Gratitude seems to us to be an integral expression of our dependency on one another. To thank someone acknowledges our need to have been helped or enriched in the first place." They add that the inability to be grateful for others may indicate a refusal to acknowledge a deficiency within oneself. This is no less true in our relationship with God. When we're ungrateful to God, it's because we have failed to see how dependent we are upon Him.
This connection between dependency on God and gratitude is quite evident in David's prayers recorded in today's passages. The first prayer in 2 Samuel 7 occurs after David has brought the ark into Jerusalem and has declared his intention to build a house for God (2 Sam. 7:1-2). But God did not want David to build a house for Him; the honor of building the temple would go to Solomon. Instead God spoke through the prophet Nathan that He was going to build a house, or everlasting dynasty, for David. Today's passage in 2 Samuel 7 captures the depth of David's gratitude and humility that God should do such a thing for him.
These same sentiments are found in the prayer recorded in 1 Chronicles 29, when David prayed before the assembly of Israel's leaders when the plans for building the temple were given to Solomon. Here we see how closely linked thanksgiving is with praise. We also see once again David's clear acknowledgment that in everything he had depended upon God's generosity. This prayer comes at the end of David's life, after he had achieved numerous military victories and had expanded Israel's borders considerably. Even so, David knew that everything comes from God's hand and ultimately belongs to Him (v. 16). An outpouring of praise is the natural response to such an acknowledgment of dependency.