• Without seeing the code, it's hard to say what is really happening.

    What are you doing to mitigate against the risk of SQL Injection in the dynamic SQL?