David wanted to build a temple for God but God would not allow him to. Instead he promised that his son, Solomon, would build the temple and he promised David would have a descendant who would be king forever. (See: [[rc://en/tw/dict/bible/kt/temple]], [[rc://en/tw/dict/bible/kt/promise]] and [[rc://en/tw/dict/bible/kt/eternity]])