29 Now be pleased to bless the house of your servant, that it may continue forever in your sight; for you, Sovereign Lord, have spoken, and with your blessing the house of your servant will be blessed forever."
19 Nevertheless, for the sake of his servant David, the Lord was not willing to destroy Judah. He had promised to maintain a lamp for David and his descendants forever.
(Read 2 Kings 8:16-24)
A general idea is given of Jehoram's badness. His father, no doubt, had him taught the true knowledge of the Lord, but did ill to marry him to the daughter of Ahab; no good could come of union with an idolatrous family.
Matthew Henry's Commentary on 2 Samuel 7:29
Commentary on 2 Samuel 7:18-29
(Read 2 Samuel 7:18-29)
David's prayer is full of the breathings of devout affection toward God. He had low thoughts of his own merits. All we have, must be looked upon as Divine gifts. He speaks very highly and honourably of the Lord's favours to him. Considering what the character and condition of man is, we may be amazed that God should deal with him as he does. The promise of Christ includes all; if the Lord God be ours, what more can we ask, or think of? Ephesians 3:20. He knows us better than we know ourselves; therefore let us be satisfied with what he has done for us. What can we say more for ourselves in our prayers, than God has said for us in his promises? David ascribes all to the free grace of God. Both the great things He had done for him, and the great things He had made known to him. All was for his word's sake, that is, for the sake of Christ the eternal Word. Many, when they go to pray, have their hearts to seek, but David's heart was found, that is, it was fixed; gathered in from its wanderings, entirely engaged to the duty, and employed in it. That prayer which is from the tongue only, will not please God; it must be found in the heart; that must be lifted up and poured out before God. He builds his faith, and hopes to speed, upon the sureness of God's promise. David prays for the performance of the promise. With God, saying and doing are not two things, as they often are with men; God will do as he hath said. The promises of God are not made to us by name, as to David, but they belong to all who believe in Jesus Christ, and plead them in his name.