1 Now it happened, when David and his men came to Ziklag, on the third day, that the Amalekites had invaded the South and Ziklag, attacked Ziklag and burned it with fire, 2 and had taken captive the women and those who were there, from small to great;… 4 Then David and the people who were with him lifted up their voices and wept, until they had no more power to weep.
6 Now David was greatly distressed, for the people spoke of stoning him, because the soul of all the people was grieved, every man for his sons and his daughters. But David strengthened himself in the Lord his God.
… David inquired of the Lord, saying, “Shall I pursue this troop? Shall I overtake them?” And He answered him, “Pursue, for you shall surely overtake them and without fail recover all.”
19 And nothing of theirs was lacking, either small or great, sons or daughters, spoil or anything which they had taken from them; David recovered all.
21 Now David came to the two hundred men who had been so weary that they could not follow David, whom they also had made to stay at the Brook Besor. So they went out to meet David and to meet the people who were with him. And when David came near the people, he greeted them. 22 Then all the wicked and worthless men of those who went with David answered and said, “Because they did not go with us, we will not give them any of the spoil that we have recovered, except for every man’s wife and children, that they may lead them away and depart.” 23 But David said, “My brethren, you shall not do so with what the Lord has given us, who has preserved us and delivered into our hand the troop that came against us. 24 For who will heed you in this matter? But as his part is who goes down to the battle, so shall his part be who stays by the supplies; they shall share alike.”
25 So it was, from that day forward; he made it a statute and an ordinance for Israel to this day.
–> David, strengthened himself in the Lord when his own people wanted to stone him to death. David inquired of the Lord on whether he should go to the battle and whether he would win.