Print the Query just before executing and see what is the value of the query string.