SQL-Connector global variable in where-clause

  • Mathieu Roll
        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)
      5 years ago #18414
      Up
      0
      Down
      ::

      Hello,

      i can’t see the issue but here is an example application where i’m using a sqlite datebase within my connector.

      perhaps this will help you to find out what the problem is.

      In the “createShoppingListItem” Call im using a structure to fill the parameters and in the “getShoppingListItemById” im using a single parameter.

      https://files.simplifier.io/f/6633b26c3c154e05b4ab/?dl=1

      steinhauer
          Has successfully completed the online course Introduction
          Has successfully completed the online course Intermediate (200)
        5 years ago #18433
        Up
        0
        Down
        ::

        Hello Malfurion,

         

        thank you for the file, but it does not solve the problem. I have got an example before, which called a MySql-database. But now I have to login to an Oracle database.

        I talked to my colleagues and we suspect that the SQL query is not compiled correctly. Again my question: What does “message”: “The index 2 is out of range.”, mean. And where can I see how the query compiled with the parameter looks like? Quotation marks may be used instead of the expected quotes. The MySql database does not mind, MsSQL and Oracle already.

        steinhauer
            Has successfully completed the online course Introduction
            Has successfully completed the online course Intermediate (200)
          5 years ago #18447
          Up
          0
          Down
          ::

          Hello Malfurion,

          Thank you for your example. My connector call I have programmed like an existing example, so your pattern unfortunately does not provide extra information.
          I’m assuming the database query still has a problem, such as quotation marks instead of quotes, or the type definition is not correct – and probably because of how the query string is put together with the parameter: job: string :.
          So my question is: how can I see the query string compiled by Simplifier?
          The field pur.t_orno, in which the parameter request is entered, has the type nvarchar (9) in the database. Is the conversion possibly not correct?

           

          Christian Kleinschroth
              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)
              Has successfully completed the online course Advanced (310)
              Has successfully completed the online course Advanced (320)
              Has successfully completed the Intermediate Certification
              Has successfully completed the Advanced Certification
            5 years ago #18480
            Up
            0
            Down
            ::

            Hello @steinhauer

            in your screenshot the params keyword has a leading / . Remove the first / and test it again.

             

            steinhauer
                Has successfully completed the online course Introduction
                Has successfully completed the online course Intermediate (200)
              5 years ago #18496
              Up
              0
              Down
              ::

              Hello Christian,

               

              I removed the leading slash, nowthe input parameter is params/auftrag. And the connector ttest message is

               

              {
              “message”: “The index 2 is out of range.”,
              “success”: false
              }

               

              like before. May be the query string compiled by Simplifier is not exactly the same as the one I entered with a fixed value.

              So again: How can I see the query string compiled by Simplifier? Or is that not possible?

              steinhauer
                  Has successfully completed the online course Introduction
                  Has successfully completed the online course Intermediate (200)
                5 years ago #18501
                Up
                0
                Down
                ::

                Hello Christian,

                 

                now it works.

                In the SQL statement was still code that was commented out. This is not handled correctly by the Simplifier when the query is compiled.

                And the request field is very unfavorable because it does not show much after the keyword select.

                Christian Kleinschroth
                    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)
                    Has successfully completed the online course Advanced (310)
                    Has successfully completed the online course Advanced (320)
                    Has successfully completed the Intermediate Certification
                    Has successfully completed the Advanced Certification
                  5 years ago #18502
                  Up
                  0
                  Down
                  ::

                  Hello Steinauer,

                   

                  the request field will be filled by the big text area in the tab sql – so you can ignore this field and work better with the big textarea with SQL Syntax-Highlightning

                Viewing 7 posts - 16 through 22 (of 22 total)

                You must be logged in to reply to this topic.