tiny flies in my soil

I accidentally bought sand to mix with the soil for my new grape vines which had an infestation of some tiny thin knats in it. Now they are in all my house plants and I need a remedy that will not kill the plants or poison the grapes. I also would like to know the best resource for identifying exactly what these bugs are. Can you help?

Submitted by randy_tools