SQL.Fetch: object isn't open on a select
PeopleCode,, Errors“SQL.Fetch: object isn’t open on a select”
You’ve spent some time trying to figure out what is wrong with your SQL statement, to no avail.
What is likely happening is that this error message is a bit of a “red herring”; the problem actually lies elsewhere. Check code that is nested inside the While SQL.Fetch() loop, as that is likely failing, closing the SQL connection, and subesquently causing the error message.
For example you might be calling a Component Interface (CI) inside you While &SQL.Fetch() loop, which is failing, but not throwing up any visible errors. You just have to sequentiallty debug all the code inside this .Fetch() loop.