I think I may have resolved the issue for anyone facing similar circumstances. Basically, the Query’s Parameter ID and the SQL variable that we are setting to ‘?’ should have the same name (I am guessing with the Casing too). So, since in the last line of my SQL query I am writing:
iu.iUserKey = ?
Then the Parameter ID for this query also needed to be iUserKey, as shown:
This resolved the issue.
I apologize for the long thread and thank you @mark for your help.
Abu.