2 Chronicles 6:9
Notwithstanding thou shalt not build the house; but thy son which shall come forth out of thy loins, he shall build the house for my name.
Cross-reference
2 Samuel 7:12 is the original prophecy that David's son would build the temple — the promise Solomon recalls in his prayer.
2 Samuel 7:13 is the original promise that David's son would build the temple, which Solomon here recalls as fulfilled.
1 Chronicles 17:4 records God telling David he will not build the temple, the same prohibition Solomon references in his prayer.
1 Chronicles 17:11 promises David that his offspring will succeed him, the very prophecy Solomon says is about to be fulfilled.
1 Chronicles 17:12 explicitly says David's son will build God's house, matching the promise Solomon recounts in his prayer.
1 Chronicles 28:3 provides the reason David could not build (he was a man of war), adding context to the prohibition Solomon mentions.