PxPlus User Forum
Main Board => Discussions => Programming => Topic started by: michaelgreer on July 15, 2021, 11:59:26 AM
-
This line of code executes on version 9.1 of PxPlus with no issue.
10010 ok=1; test=hfn; if %wdx=1 then open (test,err=MISSING_WASP)"[WDX][ODB]SunnyLabel" else open (test,err=MISSING_WASP)"[ODB]SunnyLabel"
The exact same code on the same workstation returns an error 15 and branches to the "MISSING_WASP" label on vesion 15.0. %WDX is in fact 1, so the wdx vefrsion is executing.
What might I be missing here?
Thanks!
-
You may be able to get more info about the error by checking msg(-1) to see if there is additional error info about the error 15.
-
Also, make sure the workstation is using the correct WindX. The 32 Bit WindX can only access ODBC databases defined by the 32-bit ODBC server, and the 64 bit WindX can only access those defined by the 64-bit ODBC server.
Windows maintains 2 different lists of valid DSN names -- one for 32-bit applications, one for 64 bit applications. The list checked will depend on the version of WindX you installed on the workstation.
-
@Mike - I had checked, but just rechecked. My Windx is 32 bit and the ODBC driver is 32 bit. @Devon, msg(-1) is empty. Any other ideas?
-
Checking MSG(-1) needs to be done on the workstation.
So when using WindX you need to call "[wdx]*windx.utl;Get_val" passing it "MSG(-1)", X$ then print X$.
Alternatively execute the open at command mode and issue:
EXECUTE "[wdx]PRINT MSG(-1)"
-
That was stupid on my part. Sorry. Now we are getting somewhere:
42000: [Microsoft][ODBC Microsoft Access Driver ] Syntax error in FROM Clause
Michael
-
Any word on this. The only thing that has changed here is the PVX version. This is a productions system and is limping along without an important feature.
-
Do you get the error on the open or when attempting to run some SQL?
The error indicates some bad SQL syntax being sent to the driver. The Open doesn't send SQL to the driver generally.
I tested with version 15.00 here and the Access ODBC driver and I was able to do a open of a DSN without error and then execute SQL without error as well.
How is the SunnyLabel DSN setup?
try enabling set_param '!Q' to see what is being sent to the ODBC driver that may help diagnose the difference as well.
-
Devon, it is just on the open, but I will do as you indicate.
-
Devon, at the 9.1 version I get no pop up when I do the open with '!Q' set. on the 15.1 version, on the open -same exact line of code - I get "SELECT COUNT(*) FROM". Again, this is on an open. The code for the open is at the top of this thread. Same DSN accessed by the 9.1 and the 15.1 version.
-
What are the exact version of the host pxplus and windx you are running?
i.e. xx.xx.xxxxx
Testing here with your line of code works for me in 15.10.0002 for the host and windx.
-
There was a issue with [ODB] and WindX that was fixed in version 16.10. You may want to try using version 16.10 of WindX and see if that resolves your issue.