Second Samuel 7:14b-15 says that if David's seed (referring to the one other than Christ, that is, Solomon) committed iniquity, God would strike him with the rod of men and with the stripes of the sons of men. However, God's lovingkindness would not depart from him, as God took it away from Saul. Solomon did commit serious sin, and God chastised him because of it, but God's lovingkindness nevertheless remained with the house of David.
In verse 16 God said to David, "Your house and your kingdom will be made sure forever before you; your throne will be established forever." Here "your kingdom" refers to Christ's kingdom, and "your throne" refers to Christ's throne. In the Bible David and Christ have one throne. Christ is the real David (Matt. 12:3-6). Eventually, Christ and we become one, for in a very real sense Christ has become us. He is the Head and we are the Body, and the Head and the Body are one.
Verses 18 through 29 are a record of David's response to God.
In verses 18 through 21 David thanked God for all the great things He had done to him for His word's sake and according to His own heart.
Next, David praised God for His greatness in all that He had done for His people Israel (vv. 22-24). In verse 24 David said, "You have established Your people Israel to be a people to You forever, and You, O Jehovah, became their God."
Finally, David asked God to build, establish, and bless his house forever according to His promise (vv. 25-29). David concluded by saying to God, "May it please You to bless the house of Your servant, that it may be before You forever; for You, O Lord Jehovah, have spoken it. And with Your blessing may the house of Your servant be blessed forever" (v. 29).