1
0
-1

Hi guys,

My question is : Joget DX Enterprise Oncloud executes  mutiple SQL commands ?


Form Feature:
Query 
Edit Form > Advanced > Configure Database Update Tool > Query

Command: 
update app_fd_conta_contabil set c_saldo_conta = c_saldo_conta - #form.pagamento_contrato.sum_pgto#
where ID = '#form.pagamento_contrato.cboCtContabil#';
update app_fd_ordemservico set c_cboStatus = 'Paga'
where ID = '#form.pagamento_contrato.txtIdOS#';

Exception Messages:

Caused by: java.sql.SQLException: 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 'update app_fd_ordemservico set c_cboStatus = 'Paga'
3635
where ID = '3878fea0-f5a7-4a' at line 3
3636
Query is: update app_fd_conta_contabil set c_saldo_conta = c_saldo_conta - 253.40
3637
where ID = '5fe076fd-6081-40a9-9695-e5f3dc06e52c';
3638
update app_fd_ordemservico set c_cboStatus = 'Paga'
3639
where ID = '3878fea0-f5a7-4ab6-9f8f-64beab411bd2';


Thanks

Paulo Nascimento

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      It depends on the JDBC driver used. Normally, it is safe to assume it does not. You should use multi tools and point to a Database Update Tool for each query.

      I think your problem is that 'c_saldo_conta' is a string, so, you cannot use operator arithmetic minus.

      c_saldo_conta = c_saldo_conta - 253.40

      You should cast it first to number before performing arithmetic operation.

        CommentAdd your comment...