• You have a data type error occurring in the database when you run your query. What does your expression evaluate to at runtime? If you can capture that you can try running the SQL against the server and see the exact problem. Post the SQL if you have issues determining the cause and would like some assistance.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato