The problem is that it's doing exactly what you told it to!
Every time the text changes, you try to get the data and add it - you don't care if the data exists already. And it's a bigger problem than you probably think: suppose I type
SELECT A1, B2, A3 FROM TABLE1
and then I realise it should have been "A2" not B2, so I go back and change it by editing the existing:
SELECT A1, A2, A3 FROM TABLE1
What values should be in your ListBox?
A1, A2, and A3
Or
A1, A2, B2, and A3
Or
A1, B2, A3, A1, A2, and A3
And what if I go back and change all of them for a "second line"? Should the previous ones be removed?
I don't know what your app is, or what exactly it's trying to do - but it needs to be aware that users make mistakes, and it shouldn't generally add things unless the user has indicated they are correct by a positive action.
If you want to add them "on the fly" then you need to keep a list of "added items" and remove them all before you add more until the user indicates he is happy.