I do not understand your solution to this at all. Please explain further.
I have the same exact problem, and when I execute the query in the query builder and manulally give it an id it works fine, but when I attempt to do this in my asp web page it gives me the same nonsensical error.