• I figured out the problem. It seems that in the SP where the code reads:

    ' "' + @param1 + '"'

    There were double quotes, which made the query treat param1 as an identifier instead of a string literal. It was hard to discern double quotes (") from 2 single quotes (''). I have modified the SP and taken care of this issue. No need to post any replies. Maybe someone else having this problem will find this post and see the error of their ways 😉