Can you show the relevant part of your code, that is:

- running the query
- testing for the result

Kees