So, it seems that David asked God, "Given these set of circumstances, will this happen?". And God confirmed as much. Who says God used foreknowledge to know with certainty? Why would God have to use his foreknowledge to answer this? Why couldn't he just give an answer based on what God already knew... Which was that Saul had solidified his character such that in any scenario matching David's theoretical specifics there were no possibilities of Saul doing otherwise. There is no need for God to see into the future to have this kind knowledge of certainty.
Perhaps.
OK, if you want an indisputable example of foreknowledge, then look at Nathanael in John 1.
Jhn 1:45 Philip findeth Nathanael, and saith unto him, We have found him, of whom Moses in the law, and the prophets, did write, Jesus of Nazareth, the son of Joseph.
46 And Nathanael said unto him, Can there any good thing come out of Nazareth? Philip saith unto him, Come and see.
47 Jesus saw Nathanael coming to him, and saith of him, Behold an Israelite indeed, in whom is no guile!
48 Nathanael saith unto him, Whence knowest thou me? Jesus answered and said unto him, Before that Philip called thee, when thou wast under the fig tree, I saw thee.
49 Nathanael answered and saith unto him, Rabbi, thou art the Son of God; thou art the King of Israel.
50 Jesus answered and said unto him, Because I said unto thee, I saw thee under the fig tree, believest thou? thou shalt see greater things than these.
51 And he saith unto him, Verily, verily, I say unto you, Hereafter ye shall see heaven open, and the angels of God ascending and descending upon the Son of man.
Note these statements;
Jesus SAW Nathanael COMING to him
Jesus said, Behold an Israelite indeed (true Jew, child of faith)
Nathanael said, Whence KNOWEST thou me? (foreknowledge, for whom he did foreknow)
Jesus said, BEFORE (foreknowledge) Philip called thee (for whom he did foreknow, them did he also did predestine and call) I SAW THEE (foreknowledge).
Now, this is important, was Nathanael a believer in Christ at this time? NO. He did not yet know who the Messiah was. However, as soon as Jesus told Nathanael he saw him under the fig tree before Philip called him, Nathanael THEN believed.
But Jesus had called Nathanael a true Israelite before Nathanael believed. This is foreknowledge, this is Jesus knowing who would believe before they actually believed.
Take it or leave it.