Customer Portal

Correct way to execute SQL

Comments 1

  • Avatar
    jurban
    0
    Comment actions Permalink
    Hi,

    DBExecute can work in 2 modes:

    1) execute stored procedure - you have to indicate this by a parameter and then the results of the stored procedure are written to the output port of the component
    2) execute a SQL query - this is the default, and the SQL query is executed by java.sql.Statement.executeUpdate(). In this case the return values of the SQL statement are not handled - which is your case.

    So in summary - if you want to use DBExecute to execute SQL which returns some data, it has to use a stored procedure. I hope this gives you some insight into the area...

    Best regards,
    Jaro

Please sign in to leave a comment.