Escaping user defined SQL Queries

Tagged:
  • mgerber
        4 years ago #19838

        Is there a possibility to Escape “:” on user defined SQL queries?

        I have a Connector with the query as a varible. The query is built in a Business-Object and passed to the Connector.

        A query like this “UPDATE xyz SET a=’xy:1234′ WHERE xyz; UPDATE xyz SET b=’xy:123′ WHERE xyz;” will result in an error. Simplifier seems to read everything between “:” as a variable and throws an Error if no Value is provided.

        How can I Escape those “:”?

        mgerber
            4 years ago #19843
            Up
            0
            Down
            ::

            The same problem is here: FORMAT([Timestamp_Create], ‘dd.MM.yyyy hh:mm:ss’) AS Timestamp_Create

            This results in: “message”: “The index 2 is out of range.”

            Armin Winkler
                Has successfully completed the online course Introduction
                Has successfully completed the online course Intermediate (200)
                Has successfully completed the online course Advanced (300)
                Has successfully completed the online course Basics (100)
              4 years ago #21772
              Up
              0
              Down
              ::

              Hello,

              have you tried using backward slashes as escape character to your SQL statements (see also: https://www.w3schools.com/js/js_strings.asp)?

               

              Regards,

              Armin

            Viewing 3 posts - 1 through 3 (of 3 total)

            You must be logged in to reply to this topic.