1
0
-1

Hello,

I am trying to use  

Unknown macro: {uuid}

 and

Unknown macro: {id}

 in the database update tool, as described here

JDBC Form Binder

and getting the following error

ERROR 09 Mar 2023 15:46:44 org.joget.apps.app.lib.DatabaseUpdateTool - Error executing plugin
java.sql.SQLException: unknown escape sequence {uuid}

Aren't these supported?



    CommentAdd your comment...

    4 answers

    1.  
      1
      0
      -1

      I just tried using the format in the pointed by Matthew in the documentation and I am still getting the error

      INSERT app_fd_table
             (id,
              c_name,
              c_emailaddress)
      VALUES ({id},
              {name},
              {emailAddress})


      1. CF

        Already did lots of search with no luck. Joget comes with MariaDB by default and that's what I am using.

        Looked at all the string literals in the MariaDB documentation and curly brackets should not have been an issue.

        String Literals - MariaDB Knowledge Base

        So not sure why this happening.


      CommentAdd your comment...
    2.  
      1
      0
      -1

      According to JDBC Form Binder#ConfigureJDBCStoreBinder the SQL should be something like this:

      INSERT app_fd_table
             (id,
              c_name,
              c_emailAddress
      VALUES ({uuid},
              {name},
              {emailAddress})



        CommentAdd your comment...
      1.  
        1
        0
        -1

        I am using MySQL too.

        Using the tool below

        My SQL statement in the Post Form Submission is like below (just copying some records from one table to another)

        insert into app_fd_fruit(id,c_name,c_color,c_price,c_parent)
        select {uuid},c_name,c_color,c_price, {id}
        from app_fd_fruit_db
        where c_color = "red"

          CommentAdd your comment...
        1.  
          1
          0
          -1

          It may depend on the database engine, I think. I also have tried the example SQL in the KB documentation and it worked fine in MySQL and MariaDB databases.

            CommentAdd your comment...