error : System has Illegally reentered

my prob is..

I have written a Local Network Paradox application and I use TQuery SQL
scripts etc for searching accross the database of Paradox tables....

Every so often i am getting an error...

    "System has illegally re-entered"

it seems to have no real pattern but i think it comes up mostly after
searching is done, and from then on no more searching can be done..

Please advice if any one can help me

cheers

Chris B