the first thing you want to do to find out what's going wrong is put
Console.WriteLine(thisQuery);
after the line StringthisQuery=
This will show you exactly what statement you're calling the Db with, and it may be clear just from looking at the output what's wrong with the statement.