I would request you to put queries into a seperate thread rather than jumping into an old thread with the queries.