Does database update tool support {uuid} and {id}?

Confluence User - 10 Mar, 2023

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?



forms

6


10 Mar, 2023
confluenceUser
confluenceUser

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.

10 Mar, 2023
confluenceUser
confluenceUser

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"

10 Mar, 2023
confluenceUser
confluenceUser

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})



10 Mar, 2023
confluenceUser
confluenceUser

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})


10 Mar, 2023
confluenceUser
confluenceUser

Google is your best friend - try how+to+solve+sql+mysql+%22unknown+escape+sequence%22

10 Mar, 2023
confluenceUser
confluenceUser

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.


RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print