winqry ERR=42

Started by edjack, April 06, 2026, 07:59:24 AM

Previous topic - Next topic

edjack

I posted this in the past but never found a solution.
Getting ERR=42
Program .../lib/_plus/winutl/winqry
Line: 1875
Can someone point me in the right direction to solve this?
thnaks
Ed Jack
Computerease

Devon Austen

Is this still version 13.10?

If you open up that program on the system that gets the error is there a line 1875 and if so what is that code?

If there is no line 1875 you may have to open up a trace window and then cause the error to happen and then look through the trace.

Can you bypass your error handling to see if you can get the real line number?
Principal Software Engineer for PVX Plus Technologies LTD.

Jane Raymond

If the version is 13.10, then line 1875 is:
1875 LET _HideCol=NUM(_HideOpts$(i,1))
Error 42 would indicate that the subscript i is out of range. The _HideCol array is dimmed to 200, so if you have more than 200 columns in your query, this would cause the issue.
Jane Raymond

edjack

we have no query's that even come close to 200 columns.
It must be something else.
Ed Jack
Computerease

edjack

We have several clients that report this ERR=42, Program: winqry, Line: 01875
One client reports that our app is just on one computer but they use different Windows user Ids and Just ONE User ID reports the error. The other users report no errors.
What does this tell us?
Ed Jack
Computerease

Jane Raymond

If it's just one user, it could be something in their query user profile, i.e. something in the options they have set for themselves in that particular query. You can see what options are set using the Query Profile Information Maintenance utility, which you can access through the Nomads Utilities menu, or through the IDE Graphical Application Builder > Utilities menu.

Enter the directory and library where the query is located, the query that is affected and choose the User. This will display the information that has been saved for the user. If there is anything listed under Info Type it may be causing the issue, so you select it and delete it and re-run the query to see if that was the issue.
Jane Raymond