I'm accessing SQL 2005 using ASP and ADODB. Everything works fine, but when I use a UDF I created in one of the queries, the application freezes. I could observe using the profiler that a infinite loop occurs. The server executes queries I didn't even create:
SELECT * FROM S_CUSTOMER WHERE S_CUSTOMER.C_CUSTOMER_ID = select * from SELECT * FROM S_CUSTOMER WHERE S_CUSTOMER.C_CUSTOMER_ID =
And that keeps going until I restart the IIS. I tested the final query, with the UDF on the Manager Studio and it worked well. So, what could be causing this?