My parameter types are value, and the WOID data type is a string while the GDC and TPC is Float4.
The error code I get is this,
File "function:runAction", line 2, in runAction
java.lang.Exception: java.lang.Exception: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near ':'.
I assume I am missing something that is rather simple, but cannot get it figured out as to what it is.
I did add that before the named query, It does bring in the Label_0 value, as well as the Label_20 value. It does give a lot more information related to the error code.
As you have correctly set the parameters dictionary in the runNamedQuery function, it suggests that the ‘:’ mentioned in the error is being sent as a value of one of the parameters.
There isn’t really anything else it can be, assuming that everything is as you have shown in the query and script.
That is what confuses me, this query is basically the same as another one I have just without a column. The values are Label_0 = MFG0208870 and the Label_20 Is 100. I may have to get in touch with Ignition and see if they have any solutions as this has been bugging me all day lol.
Gosh, I am almost ashamed to admit that was the error. Thank you for troubleshooting and finding the solution! Might need to take a break, been staring at the screen for too long lol.
Haha no worries, the query editor is where most of my headaches come from as it isn’t the best at telling you what the exact issue is like in this case.
I found that if you have an incorrect data type, say Int4 when it wants an Int8.
MSSQL data type integer, using numbers with six or less digits, I thought Int4 was correct, however I got the same syntax error, but upon changing it to Int8, no error and the query functioned as expected.