1 Samuel 16:21
21 And David came to Saul, and stood before him: and he loved him greatly; and he became his armourbearer.
And David
Compare (1 Samuel 17:55).
The order of events is:
(1) David, whose skill on the harp, and valour in the combat with the lion and bear (1 Samuel 17:34); (1 Samuel 17:36) were known to "one of the servants" of Saul, was brought to play before the king (1 Samuel 16:17); (1 Samuel 16:18).
(2) David returns to Bethlehem (1 Samuel 17:15).
(3) David is sent to Saul's camp (1 Samuel 17:17); (1 Samuel 17:18) and performs his great exploit.
(4) Saul's question (1 Samuel 17:55); (1 Samuel 17:56) implies only that he had forgotten the name of David's father -- not remarkable certainly in an oriental king.