Workflow Soluiton

 View Only
  • 1.  MySQL ODBC Generator Syntax error.

    Posted Mar 05, 2015 03:36 AM

    I've been trying to use the Stored Procedure generator to create components for MySQL with ODBC but I keep getting a syntax error as follows :

    ErrorMessage = "ERROR [42000] [MySQL][ODBC 5.3(a) Driver][mysqld-5.6.22-log]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 'CreateNewEntry' at line 1"
    LastComponent = "Create New Entry"

    The stored procedure runs ok from MySQL Workbench.

    Is that the same as the error 3636359 in http://www.symantec.com/docs/HOWTO101650 ?

    If so it was supposed to be fixed in a 7.5 service pack hot fix.  I'm using 7.6.4383 so maybe its not the same thing?

    Has anyone else seen this?



  • 2.  RE: MySQL ODBC Generator Syntax error.
    Best Answer

    Posted Mar 06, 2015 11:46 AM

    i had an issue with an oracle statement once upon a time; the generator was complaining about syntax.  with a bit of trial and error i was able to translate between what oracle convention dictates and what the generator expected to see.  i agree that it's not exactly straightforward, but it's likely that the generator will work given a few tweaks to the syntax (tweaks that may not make sense in a MySQL context).  that's assuming of course that there isn't an existing bug that will prevent success outright.



  • 3.  RE: MySQL ODBC Generator Syntax error.

    Posted Mar 07, 2015 12:54 AM

    The error occurs with the resulting component when it is used in a workflow. Is that what you saw? I can't rule out a syntax problem but even the most simple select query in a stored proc generates this error when called from a component.



  • 4.  RE: MySQL ODBC Generator Syntax error.

    Posted Mar 09, 2015 12:58 PM

    What does the code look like around the snippet mentioned in the error?



  • 5.  RE: MySQL ODBC Generator Syntax error.

    Posted Mar 14, 2015 10:06 PM

    Thanks for helping out Andrew - you pointed me in the right direction.  This was a case of me not quite getting the content right in the generator.  It still lets you create the component but it generates errors as per my original post.

    For anyone else encountering this issue there are a few things you need to do for ODBC and MySQL.

    1. If you are using the Query generator then define your variables with a '?' insead of the normal '@' and then once they are detected then revert them to the '@' manually.
    2. If you are using the Stored Procedure generator then be sure to reference your stored procedure with the CALL `[instance]`.`[stored_proc]`("[variable1]", "[variable2]"); format in the generator.  I had to manually define the query parameters - it wouldn't auto detect these.

    You might be able to do away with the CALL and ; parts.