Lord, remember David - Call to remembrance his zeal, his labor, his trials in order that there might be a permanent place for thy worship. Call this to remembrance in order that his purpose in thy cause may not be frustrated; in order that the promises made to him may be accomplished.
And all his afflictions - The particular trial here referred to was his care and toil, that there might be a settled home for the ark. The word used would not refer merely to what is specified in the following verses (his bringing up the ark to Mount Zion), but to his purpose to build a house for God, and - since he was not permitted himself to build it because he was a man of war, and had been engaged in scenes of blood, 1 Kings 5:3; 1 Chronicles 22:8 - to his care and toil in collecting materials for the temple to be erected by his son and successor. It is not, therefore, his general afflictions which are here meant, but his anxiety, and his efforts to secure a lasting place for the worship of God.