5 For David said, "Solomon my son is young and inexperienced, and the house that is to be built for the Lord must be exceedingly magnificent, of fame and glory throughout all lands; I will therefore make preparation for it." So David provided materials in great quantity before his death.

6 Then he called for Solomon his son, and charged him to build a house for the Lord, the God of Israel. 7 David said to Solomon, "My son, I had it in my heart to build a house to the name of the Lord my God. 8 But the word of the Lord came to me, saying, 'You have shed much blood and have waged great wars; you shall not build a house to my name, because you have shed so much blood before me upon the earth. 9 Behold, a son shall be born to you; he shall be a man of peace. I will give him peace from all his enemies round about; for his name shall be Solomon, and I will give peace and quiet to Israel in his days.

Matthew Henry's Commentary on 1 Chronicles 22:5-9

Commentary on 1 Chronicles 22:1-5

(Read 1 Chronicles 22:1-5)

On occasion of the terrible judgment inflicted on Israel for the sin of David, God pointed out the place where he would have the temple built; upon which, David was excited to make preparations for the great work. David must not build, but he would do all he could; he prepared abundantly before his death. What our hands find to do for God, and our souls, and those round us, let us do it with all our might, before our death; for after death there is no device nor working. And when the Lord refuses to employ us in those services which we desired, we must not be discouraged or idle, but do what we can, though in a humbler sphere.

Commentary on 1 Chronicles 22:6-16

(Read 1 Chronicles 22:6-16)

David gives Solomon the reason why he should build the temple. Because God named him. Nothing is more powerful to engage us in any service for God, than to know that we are appointed thereto. Because he would have leisure and opportunity to do it. He should have peace and quietness. Where God gives rest, he expects work. Because God had promised to establish his kingdom. God's gracious promises should quicken and strengthen our religious service. David delivered to Solomon an account of the vast preparations he had made for this building; not from pride and vain-glory, but to encourage Solomon to engage cheerfully in the great work. He must not think, by building the temple, to purchase a dispensation to sin; on the contrary, his doing that would not be accepted, if he did not take heed to fulfil the statutes of the Lord. In our spiritual work, as well as in our spiritual warfare, we have need of courage and resolution.