Having heard the Lord’s promise to build him a house, David responds with a prayer of thanksgiving. In David’s words, John Calvin (1509-1564), like many of his contemporaries, finds an important lesson on the nature of prayer, as he sees David exercising the boldness of faith, calling on God as God commands us to do.

Commentary on 2 Samuel 7:18-29

Let us carefully note these words, where it says: “Lord, since it is thus, let the house therefore of your servant be established forever.” . . . God had declared he would do this. David was relying on this promise so as to rest on it. And why, then, does he add this prayer? It seems that it would be superfluous. But on the contrary, these are inseparable things, as I have said: the prayer itself and the desire we have to pray for God to accomplish it all and make us feel it in reality. When, therefore, we pray to God, it is not that we are doubting whether he is already inclined to do us good; or whether he watches out to support us in all our necessities; or whether he knows them well; or that when he has spoken, he does not want to carry out his Word. Rather, the fact is that our faith ought to be exercised, and that God, in offering us his mercy and grace, invites us to have the boldness to call on him (Eph 2:18). Without this, he cannot give us free access.

1-2 Samuel, 1-2 Kings, 1-2 Chronicles, eds. Derek Cooper and Martin J. Lohrmann, Reformation Commentary on Scripture, OT vol. 5, 234.