1 Samuel 30:3 So David and his men came to the city, and there it was, burned with fire; and their wives, their sons, and their daughters had been taken captive. 4 Then David and the people who were with him lifted up their voices and wept, until they had no more power to weep. 5 And Davids two wives, Ahinoam the Jezreelitess, and Abigail the widow of Nabal the Carmelite, had been taken captive. 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.
7 Then David said to Abiathar the priest, Ahimelechs son, Please bring the ephod here to me. And Abiathar brought the ephod to David. 8 So 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.
Let's fast forward a bit....
17 Then David attacked them from twilight until the evening of the next day. Not a man of them escaped, except four hundred young men who rode on camels and fled. 18 So David recovered all that the Amalekites had carried away, and David rescued his two wives. 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. 20 Then David took all the flocks and herds they had driven before those other livestock, and said, This is Davids spoil.