I do not see a discrepancy in this at all. Yes, Saul definitely “knew” David before the battle with Goliath; however, he may not have really known who he was (in the sense of remembering his name) and certainly may not have remembered the name of David’s father.
1 Samuel 16:17-22 says, “So Saul said to his attendants, “Find someone who plays well and bring him to me.”
One of the servants answered, “I have seen a son of Jesse of Bethlehem who knows how to play the harp. He is a brave man and a warrior. He speaks well and is a fine-looking man. And the LORD is with him.”
Then Saul sent messengers to Jesse and said, “Send me your son David, who is with the sheep.” So Jesse took a donkey loaded with bread, a skin of wine and a young goat and sent them with his son David to Saul.
David came to Saul and entered his service. Saul liked him very much, and David became one of his armor-bearers. Then Saul sent word to Jesse, saying, “Allow David to remain in my service, for I am pleased with him.”
Now think about this for a second. As King, Saul probably had countless servants and it is not likely that he would have known (or remembered) all of their names. So he asks a servant to find him someone who can play the harp and someone basically says, “Hey, I know a guy.” Saul’s response is basically, “Fine. Go get him.”
The fact that Saul liked David and wanted him to remain in Saul’s service doesn’t necessarily mean that he would remember the name of David’s father. Again, David would be just a single servant in the service of a King and there is no reason that he would automatically have remembered details about who David was.
Further, the fact that Saul sent word to Jesse to “allow David to remain in my service” doesn’t automatically mean that David lived with Saul 24 hours a day. He could have been in the service of the king but not been there on a full-time basis. This argument becomes an important point later.
Also, we don’t know how much time passed between when David was playing the harp for Saul and when he fought Goliath. As everyone knows, teenaged boys can look totally different over the span of a year or so. I’m sure we all know of kids that age that shot up 6 or 8 inches over a couple years time during those teen years. I mention this only to say that David could have grown a lot since Saul had seen him and may not have even recognized him after the Goliath battle as being the boy who had played the harp for him at earlier times.
Again, the evidence indicates that, although David might have been in the “service” of the King, he was not there full-time, 24/7. Remember, he was with his father when Jesse sent him to take food to his brothers (see 1 Samuel 17:17, which says, “Now Jesse said to his son David, “Take this ephah of roasted grain and these ten loaves of bread for your brothers and hurry to their camp.”)
After the battle with Goliath, we direct our attention to 1 Samuel 17:55:58, which says, “As Saul watched David going out to meet the Philistine, he said to Abner, commander of the army, “Abner, whose son is that young man?”
Abner replied, “As surely as you live, O king, I don’t know.”
The king said, “Find out whose son this young man is.”
As soon as David returned from killing the Philistine, Abner took him and brought him before Saul, with David still holding the Philistine’s head.
“Whose son are you, young man?” Saul asked him.
Again, this questioning should not concern us. It is certainly not proof of any discrepancy in the scripture. Like I said above, we don’t know how often David had played the harp for Saul. Weeks or even months could have passed sometimes. We just don’t know and I am not trying to speculate. However, we do have evidence that David’s “service” of Saul was not on a full-time basis, as evidenced by the reference to 1 Samuel 17:17 above.
This is further confirmed by looking at 1 Samuel 18:1,2 which says, “After David had finished talking with Saul, Jonathan became one in spirit with David, and he loved him as himself. From that day Saul kept David with him and did not let him return to his father’s house.”
Again, if David was already in full-time service of the King, there would not have been any reason for the statement that “From that day Saul kept David with him and did not let him return to his father’s house.”
In conclusion, a King necessarily would have had many, many people in his service in various capacities and it is doubtful that he would have always remembered their names or the names of their fathers. As a young boy, David would have been a minor player in all of this. Saul might have liked David and enjoyed him playing the harp for him but we do have evidence that he was not with Saul on a full-time basis and we have no way to know how often he was even around Saul. Therefore, the fact that Saul did not seem to remember who he was (or who David’s father was) is not necessarily of any concern for the reader. David could have grown several inches since Saul had seen him last or, even if he did recognize him as “David, the harp player”, he might not automatically have remembered who his family was.