Hi, I'm currently fixing a bug in an older legacy system of ours.

Hi,

I'm currently fixing a bug in an older legacy system of ours. As part of it's operation, this process relies on using ACPs as part of a query to the DB to limit the amount of results. Here's the query:

SELECT DISTINCT ID
FROM a
Limit ac!startRow, ac!endRow

Now, if I open that node and then try to save it (by clicking "ok") it returns me this error:

The database returned ARV's that may not be supported. Message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \\'\\'\\', \\'\\'\\' at line 4

I've tried using three version of the connector, in case it was a JDBC bug, but no go. Does anyone have any idea how I can resolve this?...

OriginalPostID-87122

OriginalPostID-87122

  Discussion posts and replies are publicly visible

Parents
  • Basically what happens is that the driver you are using is now more strict in following what the documentation of MySQL states: the LIMIT function only accepts one or two numeric constants. In the case of this model the query is:

    SELECT DISTINCT ID FROM a Limit ac!startRow, ac!endRow


    which when subject to validation translates into:

    SELECT DISTINCT ID FROM a Limit '', ''

    since at validation time the acp's haven't been populated yet. This is invalid as both parameters are empty strings, not a number, thus the error: ".... for the right syntax to use near \\'\\'\\', \\'\\'\\' at line 4

    Here's the driver I have been able to use the acp's and limit with: forum.appian.com/.../112416

    remember that a driver change requires a restart of the application server
Reply
  • Basically what happens is that the driver you are using is now more strict in following what the documentation of MySQL states: the LIMIT function only accepts one or two numeric constants. In the case of this model the query is:

    SELECT DISTINCT ID FROM a Limit ac!startRow, ac!endRow


    which when subject to validation translates into:

    SELECT DISTINCT ID FROM a Limit '', ''

    since at validation time the acp's haven't been populated yet. This is invalid as both parameters are empty strings, not a number, thus the error: ".... for the right syntax to use near \\'\\'\\', \\'\\'\\' at line 4

    Here's the driver I have been able to use the acp's and limit with: forum.appian.com/.../112416

    remember that a driver change requires a restart of the application server
Children
No Data